1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-20 02:42:09 +03:00

Fixes incorrect indexing of KEX prefs string

After stripping out an invalid KEX pref entry, it would incorrectly advance again leaving invalid values in the list.
This commit is contained in:
Will Cosgrove
2018-03-15 16:53:58 -07:00
committed by GitHub
parent 42cf29101e
commit 40a79d3558

View File

@@ -3527,8 +3527,9 @@ libssh2_session_method_pref(LIBSSH2_SESSION * session, int method_type,
}
}
}
s = p ? (p + 1) : NULL;
else {
s = p ? (p + 1) : NULL;
}
}
if(strlen(newprefs) == 0) {