diff options
author | Max Rees <maxcrees@me.com> | 2020-06-10 14:17:16 -0500 |
---|---|---|
committer | Max Rees <maxcrees@me.com> | 2020-07-07 17:45:44 -0500 |
commit | f5ad03e26a97b2a02e6ede4c7db3ea88a836e6c4 (patch) | |
tree | 5160cc631e7a2cc0a416893ef37f079748f633be /user/sane/network.patch | |
parent | 86ee3ce0c1d38ac0c6459fff85514b7d6ee5dd43 (diff) | |
download | packages-f5ad03e26a97b2a02e6ede4c7db3ea88a836e6c4.tar.gz packages-f5ad03e26a97b2a02e6ede4c7db3ea88a836e6c4.tar.bz2 packages-f5ad03e26a97b2a02e6ede4c7db3ea88a836e6c4.tar.xz packages-f5ad03e26a97b2a02e6ede4c7db3ea88a836e6c4.zip |
user/sane: [CVE] bump to 1.0.30 (#294)
Diffstat (limited to 'user/sane/network.patch')
-rw-r--r-- | user/sane/network.patch | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/user/sane/network.patch b/user/sane/network.patch index 4e422e28d..845bf9913 100644 --- a/user/sane/network.patch +++ b/user/sane/network.patch @@ -1,23 +1,22 @@ -diff --git a/sanei/sanei_tcp.c b/sanei/sanei_tcp.c -index a57d7c7..d0a1e92 100644 ---- a/sanei/sanei_tcp.c -+++ b/sanei/sanei_tcp.c -@@ -45,6 +45,7 @@ - #include <unistd.h> +--- sane-backends-1.0.30/sanei/sanei_tcp.c 2020-05-17 06:54:18.000000000 -0500 ++++ sane-backends-1.0.30/sanei/sanei_tcp.c 2020-06-10 14:10:06.980398975 -0500 +@@ -46,6 +46,7 @@ #include <stdlib.h> #include <string.h> + #include <limits.h> +#include <time.h> - #ifdef HAVE_WINSOCK2_H - #include <winsock2.h> -@@ -123,14 +124,27 @@ sanei_tcp_write(int fd, const u_char * buf, int count) - ssize_t - sanei_tcp_read(int fd, u_char * buf, int count) + #ifndef SSIZE_MAX + #define SSIZE_MAX LONG_MAX +@@ -130,6 +131,7 @@ sanei_tcp_read(int fd, u_char * buf, siz { -- ssize_t bytes_recv = 0, rc = 1; -+ ssize_t bytes_recv = 0, rc = 1; + size_t bytes_recv = 0; + ssize_t rc = 1; + int retry = 5; + if (count > SSIZE_MAX) { + errno = EINVAL; +@@ -139,9 +141,21 @@ sanei_tcp_read(int fd, u_char * buf, siz while (bytes_recv < count && rc > 0) { rc = recv(fd, buf+bytes_recv, count-bytes_recv, 0); |