1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-20 18:02:58 +03:00

buffer: Use sizeof instead of magic number

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Norbert Pocs <norbertpocs0@gmail.com>
(cherry picked from commit f2b64abcbd)
This commit is contained in:
Jakub Jelen
2025-05-30 09:20:41 +02:00
parent 52e648c7f1
commit 65699380cf

View File

@ -852,7 +852,7 @@ static int ssh_buffer_pack_allocate_va(struct ssh_buffer_struct *buffer,
break;
case 'S':
string = va_arg(ap, ssh_string);
needed_size += 4 + ssh_string_len(string);
needed_size += sizeof(uint32_t) + ssh_string_len(string);
string = NULL;
break;
case 's':