mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-30 13:01:23 +03:00
packet: Add missing null pointer check in ssh_packet_socket_callback()
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -1062,6 +1062,9 @@ int ssh_packet_socket_callback(const void *data, size_t receivedlen, void *user)
|
|||||||
packet_len - (lenfield_blocksize - sizeof(uint32_t));
|
packet_len - (lenfield_blocksize - sizeof(uint32_t));
|
||||||
cleartext_packet = ssh_buffer_allocate(session->in_buffer,
|
cleartext_packet = ssh_buffer_allocate(session->in_buffer,
|
||||||
packet_remaining);
|
packet_remaining);
|
||||||
|
if (cleartext_packet == NULL) {
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
if (session->current_crypto) {
|
if (session->current_crypto) {
|
||||||
/*
|
/*
|
||||||
* Decrypt the rest of the packet (lenfield_blocksize bytes already
|
* Decrypt the rest of the packet (lenfield_blocksize bytes already
|
||||||
|
|||||||
Reference in New Issue
Block a user