summaryrefslogtreecommitdiffstats
path: root/source/a/infozip/unzip-patches/unzip-6.0-valgrind.patch
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2019-03-01 23:44:12 +0000
committer Eric Hameleers <alien@slackware.com>2019-03-02 08:59:47 +0100
commitd26b7f6e82486c7fe02690ce5706b0660867c70b (patch)
treea0974c296e6fafc1ae78b443247ec50cd48347ac /source/a/infozip/unzip-patches/unzip-6.0-valgrind.patch
parent2c09649cb63357808c79c8c6734f986fd5a0d2aa (diff)
downloadcurrent-d26b7f6e82486c7fe02690ce5706b0660867c70b.tar.gz
current-d26b7f6e82486c7fe02690ce5706b0660867c70b.tar.xz
Fri Mar 1 23:44:12 UTC 201920190301234412
a/eudev-3.2.7-x86_64-2.txz: Rebuilt. Don't require kvm group.
Diffstat (limited to 'source/a/infozip/unzip-patches/unzip-6.0-valgrind.patch')
-rw-r--r--source/a/infozip/unzip-patches/unzip-6.0-valgrind.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/source/a/infozip/unzip-patches/unzip-6.0-valgrind.patch b/source/a/infozip/unzip-patches/unzip-6.0-valgrind.patch
new file mode 100644
index 000000000..41a752023
--- /dev/null
+++ b/source/a/infozip/unzip-patches/unzip-6.0-valgrind.patch
@@ -0,0 +1,26 @@
+diff --git a/fileio.c b/fileio.c
+index ba0a1d0..03fc4be 100644
+--- a/fileio.c
++++ b/fileio.c
+@@ -2006,6 +2006,7 @@ int do_string(__G__ length, option) /* return PK-type error code */
+ unsigned comment_bytes_left;
+ unsigned int block_len;
+ int error=PK_OK;
++ unsigned int length2;
+ #ifdef AMIGA
+ char tmp_fnote[2 * AMIGA_FILENOTELEN]; /* extra room for squozen chars */
+ #endif
+@@ -2292,8 +2293,12 @@ int do_string(__G__ length, option) /* return PK-type error code */
+ seek_zipf(__G__ G.cur_zipfile_bufstart - G.extra_bytes +
+ (G.inptr-G.inbuf) + length);
+ } else {
+- if (readbuf(__G__ (char *)G.extra_field, length) == 0)
++ if ((length2 = readbuf(__G__ (char *)G.extra_field, length)) == 0)
+ return PK_EOF;
++ if(length2 < length) {
++ memset (__G__ (char *)G.extra_field+length2, 0 , length-length2);
++ length = length2;
++ }
+ /* Looks like here is where extra fields are read */
+ getZip64Data(__G__ G.extra_field, length);
+ #ifdef UNICODE_SUPPORT