sftp: Use uint32_t for sftp extension count

Fixes T188

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
(cherry picked from commit c29840060b)
This commit is contained in:
Andreas Schneider
2019-10-31 15:57:59 +01:00
parent dbf757e3e8
commit f45aa46322

View File

@@ -58,7 +58,7 @@
#define SFTP_BUFFER_SIZE_MAX 16384
struct sftp_ext_struct {
unsigned int count;
uint32_t count;
char **name;
char **data;
};
@@ -685,7 +685,7 @@ int sftp_init(sftp_session sftp) {
version);
rc = ssh_buffer_unpack(packet->payload, "s", &ext_name);
while (rc == SSH_OK) {
int count = sftp->ext->count;
uint32_t count = sftp->ext->count;
char **tmp;
rc = ssh_buffer_unpack(packet->payload, "s", &ext_data);