1
1
libssh/include
Baruch Siach 6c7eaa9e12 buffer: Convert argc to size_t in ssh_buffer_unpack() as well
Commit c306a693f3 ("buffer: Use size_t for argc argument in
ssh_buffer_(un)pack()") mentioned unpack in the commit log, but it only
touches the pack variants. Extend the conversion to unpack.

Pre-initialize the p pointer to avoid possible use before
initialization in case of early argc check failure.

This fixes build failure:

.../libssh-0.8.6/src/buffer.c: In function 'ssh_buffer_unpack_va':
.../libssh-0.8.6/src/buffer.c:1229:16: error: assuming signed overflow does not occur when simplifying conditional to constant [-Werror=strict-overflow]
             if (argc == -1){
		^

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-01-24 17:48:08 +01:00
..
libssh buffer: Convert argc to size_t in ssh_buffer_unpack() as well 2019-01-24 17:48:08 +01:00
CMakeLists.txt cmake: Do not use CMAKE_(SOURCE|BINARY)_DIR 2015-06-24 18:17:05 +02:00