1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-24 13:41:04 +03:00

buffer overflow (valgrind) (#159)

This commit is contained in:
doublex
2018-04-19 19:45:26 +02:00
committed by Will Cosgrove
parent 6b0f67fd55
commit 83151a65f3

View File

@@ -491,7 +491,7 @@ memory_read_publickey(LIBSSH2_SESSION * session, unsigned char **method,
sp1++;
sp2 = memchr(sp1, ' ', pubkey_len - (sp1 - pubkey - 1));
sp2 = memchr(sp1, ' ', pubkey_len - (sp1 - pubkey));
if(sp2 == NULL) {
/* Assume that the id string is missing, but that it's okay */
sp2 = pubkey + pubkey_len;