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:
Jakub Jelen
2023-06-28 10:18:04 +02:00
parent 20dcb8b830
commit 62f013ae96

View File

@@ -85,7 +85,10 @@ sftp_make_client_message(sftp_session sftp, sftp_packet packet)
}
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) {