diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2013-11-14 11:42:21 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2013-11-14 11:42:21 +0100 |
commit | 097760db178ab2033692e4c782cf0f3a06065803 (patch) | |
tree | 3948a4472d236ba6fd89aa9c527f22e42df03999 | |
parent | b3a08ba8d3cafa5b027fc40e8737576ec5023db9 (diff) | |
download | libssh-097760db178ab2033692e4c782cf0f3a06065803.tar.gz libssh-097760db178ab2033692e4c782cf0f3a06065803.tar.xz libssh-097760db178ab2033692e4c782cf0f3a06065803.zip |
packet: Set the packet to the processed data position.
Else we could end up with packet - current_macsize if to_be_read is 0.
-rw-r--r-- | src/packet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/packet.c b/src/packet.c index 089a2a6..c6c30bd 100644 --- a/src/packet.c +++ b/src/packet.c @@ -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; } |