diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2018-08-06 09:19:45 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-08-06 09:36:50 +0200 |
commit | 24aef4fbf141afe79e016f7097ef0d67f026b9b7 (patch) | |
tree | 3cae2370dfda5cb4286d08adb128c358de29ef42 | |
parent | fbfe0024604fa948e3cf865e6fb89afc5b91cabe (diff) | |
download | libssh-24aef4fbf141afe79e016f7097ef0d67f026b9b7.tar.gz libssh-24aef4fbf141afe79e016f7097ef0d67f026b9b7.tar.xz libssh-24aef4fbf141afe79e016f7097ef0d67f026b9b7.zip |
sftp: Add missing size checks
CID 1238630
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r-- | src/sftp.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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--; |