aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/unzip-valgrind.patch
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2021-03-24 15:28:33 +0200
committerEfraim Flashner <efraim@flashner.co.il>2021-03-24 20:50:44 +0200
commit2aab587f842908a886e3bd08b028885dddd650e0 (patch)
tree87c0723a9ae2c69ab6920d90b6e87ad8510492fe /gnu/packages/patches/unzip-valgrind.patch
parent5664bcdcb0e4c10dfe48dd5e4730fc3c746a21e2 (diff)
parent65c46e79e0495fe4d32f6f2725d7233fff10fd70 (diff)
downloadguix-2aab587f842908a886e3bd08b028885dddd650e0.tar.gz
guix-2aab587f842908a886e3bd08b028885dddd650e0.zip
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'gnu/packages/patches/unzip-valgrind.patch')
-rw-r--r--gnu/packages/patches/unzip-valgrind.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/gnu/packages/patches/unzip-valgrind.patch b/gnu/packages/patches/unzip-valgrind.patch
new file mode 100644
index 0000000000..41a752023b
--- /dev/null
+++ b/gnu/packages/patches/unzip-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