1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-08-08 19:02:06 +03:00

packet: Set the packet to the processed data position.

Else we could end up with packet - current_macsize if to_be_read is 0.
This commit is contained in:
Andreas Schneider
2013-11-14 11:42:21 +01:00
parent 2b3e69fd5f
commit 2eaff2b363

View File

@@ -263,7 +263,7 @@ int ssh_packet_socket_callback(const void *data, size_t receivedlen, void *user)
}
/* copy the last part from the incoming buffer */
packet = packet + to_be_read - current_macsize;
packet = ((uint8_t *)data) + processed;
if (packet == NULL) {
goto error;
}