mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
sftpserver: Check return value ssh_buffer_get_u32
CID 1513157 Thanks coverity Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Norbert Pocs <npocs@redhat.com>
This commit is contained in:
@@ -85,7 +85,10 @@ sftp_make_client_message(sftp_session sftp, sftp_packet packet)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (msg->type != SSH_FXP_INIT) {
|
if (msg->type != SSH_FXP_INIT) {
|
||||||
ssh_buffer_get_u32(payload, &msg->id);
|
rc = ssh_buffer_get_u32(payload, &msg->id);
|
||||||
|
if (rc != sizeof(uint32_t)) {
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (msg->type) {
|
switch (msg->type) {
|
||||||
|
|||||||
Reference in New Issue
Block a user