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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user