diff options
author | Baruch Siach <baruch@tkos.co.il> | 2019-01-22 13:58:05 +0200 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2019-01-22 23:30:49 +0100 |
commit | 9952e3b56ef4de6a77b2e605add931800a3a2fb1 (patch) | |
tree | 275954707ff30f92e72aea85485e6117e9cd8d5c /package/libssh/0001-buffer-Fix-size-comparison-with-count.patch | |
parent | 255f9172377f98da18ce8797e1ddf35f8f369373 (diff) | |
download | buildroot-9952e3b56ef4de6a77b2e605add931800a3a2fb1.tar.gz buildroot-9952e3b56ef4de6a77b2e605add931800a3a2fb1.zip |
libssh: fix some -Werror=strict-overflow build failures
Add fixes for some of the build failures caused by strict-overflow
warnings. Patches #1, #2, and #4 are upstream. Patch #3 is pending
upstream.
Fixes:
http://autobuild.buildroot.net/results/923/9239f230629ca4e381af5e8f43989997d9bfde99/
http://autobuild.buildroot.net/results/618/6187b92bcdfd9281683c37906ae74f2e0c5e6d0e/
http://autobuild.buildroot.net/results/9eb/9eb5ed92a923f0c038e3d913289eddc1cda1b62f/
Cc: Scott Fan <fancp2007@gmail.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/libssh/0001-buffer-Fix-size-comparison-with-count.patch')
-rw-r--r-- | package/libssh/0001-buffer-Fix-size-comparison-with-count.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/package/libssh/0001-buffer-Fix-size-comparison-with-count.patch b/package/libssh/0001-buffer-Fix-size-comparison-with-count.patch new file mode 100644 index 0000000000..88e1bc3b48 --- /dev/null +++ b/package/libssh/0001-buffer-Fix-size-comparison-with-count.patch @@ -0,0 +1,48 @@ +From 2aa8c46a853acd4198af16e417ebffd5b0e2c9f4 Mon Sep 17 00:00:00 2001 +From: Andreas Schneider <asn@cryptomilk.org> +Date: Mon, 1 Oct 2018 20:58:47 +0200 +Subject: [PATCH] buffer: Fix size comparison with count + +Signed-off-by: Andreas Schneider <asn@cryptomilk.org> +Signed-off-by: Baruch Siach <baruch@tkos.co.il> +--- +Upstream status: commit 9c3ba94960cd5 + + src/buffer.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/buffer.c b/src/buffer.c +index da6e587fc9e4..b029f202660f 100644 +--- a/src/buffer.c ++++ b/src/buffer.c +@@ -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); + +-- +2.20.1 + |