1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-27 13:21:11 +03:00

buffer: Fix size comparison with count

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2018-10-01 20:58:47 +02:00
parent 194c34ebe3
commit 9c3ba94960

View File

@@ -816,8 +816,8 @@ static int ssh_buffer_pack_allocate_va(struct ssh_buffer_struct *buffer,
ssh_string string = NULL;
char *cstring = NULL;
size_t needed_size = 0;
size_t count;
size_t len;
int count; /* int for size comparison with argc */
int rc = SSH_OK;
for (p = format, count = 0; *p != '\0'; p++, count++) {
@@ -934,7 +934,7 @@ int ssh_buffer_pack_va(struct ssh_buffer_struct *buffer,
char *cstring;
bignum b;
size_t len;
int count;
int count; /* int for size comparison with argc */
for (p = format, count = 0; *p != '\0'; p++, count++) {
/* Invalid number of arguments passed */
@@ -1098,7 +1098,7 @@ int ssh_buffer_unpack_va(struct ssh_buffer_struct *buffer,
} o;
size_t len, rlen, max_len;
va_list ap_copy;
int count;
int count; /* int for size comparison with argc */
max_len = ssh_buffer_get_len(buffer);