mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-27 13:21:11 +03:00
sftp: Add missing size checks
CID 1238630 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -355,7 +355,7 @@ sftp_packet sftp_packet_read(sftp_session sftp) {
|
||||
ssh_buffer_get_u8(packet->payload, &packet->type);
|
||||
|
||||
size = ntohl(tmp);
|
||||
if (size == 0) {
|
||||
if (size == 0 || size > UINT32_MAX) {
|
||||
return packet;
|
||||
}
|
||||
size--;
|
||||
|
||||
Reference in New Issue
Block a user