Fixed incorrect reference to decrypted block
Fixed incorrectly copied memory from p->buf into init instead of from the decrypted buffer block. The only reason this worked was because the crypt() function decrypts the value in-place and overwrites p->buf. I'm working on a fork that no longer does this and exposed this bug.
Этот коммит содержится в:
родитель
616fd4d1b3
Коммит
a7df51164d
@ -420,7 +420,7 @@ int _libssh2_transport_read(LIBSSH2_SESSION * session)
|
||||
}
|
||||
/* save the first 5 bytes of the decrypted package, to be
|
||||
used in the hash calculation later down. */
|
||||
memcpy(p->init, &p->buf[p->readidx], 5);
|
||||
memcpy(p->init, block, 5);
|
||||
} else {
|
||||
/* the data is plain, just copy it verbatim to
|
||||
the working block buffer */
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user