summaryrefslogtreecommitdiffstats
path: root/development/gcc5/fastjar-patches/1000-fastjar-0.97-segfault.patch
diff options
context:
space:
mode:
author Matteo Bernardini2019-02-10 08:24:16 +0100
committer Matteo Bernardini2019-02-10 08:24:16 +0100
commit082425de77642723e77944b1d5eb726faadfa957 (patch)
treeb2c49cdf46c33eb597c60eec4dd96e0cca70af80 /development/gcc5/fastjar-patches/1000-fastjar-0.97-segfault.patch
parentd80298d80370c2c670a9e5182c5bc4eb40c4a0e0 (diff)
downloadslackbuilds-05becb955408a7871f1b9a339ea541541a3e346a.tar.gz
20190210.1 global branch merge.current-20190210.1
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'development/gcc5/fastjar-patches/1000-fastjar-0.97-segfault.patch')
-rw-r--r--development/gcc5/fastjar-patches/1000-fastjar-0.97-segfault.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/development/gcc5/fastjar-patches/1000-fastjar-0.97-segfault.patch b/development/gcc5/fastjar-patches/1000-fastjar-0.97-segfault.patch
new file mode 100644
index 0000000000..ab6262407a
--- /dev/null
+++ b/development/gcc5/fastjar-patches/1000-fastjar-0.97-segfault.patch
@@ -0,0 +1,29 @@
+2009-01-14 Jakub Jelinek <jakub@redhat.com>
+
+ * jartool.c (make_manifest): Initialize current_time before
+ calling unix2dostime on it.
+
+--- fastjar-0.97/jartool.c.jj 2008-10-15 18:35:37.000000000 +0200
++++ fastjar-0.97/jartool.c 2009-01-14 15:40:50.000000000 +0100
+@@ -820,6 +820,10 @@ int make_manifest(int jfd, const char *m
+ int mod_time; /* file modification time */
+ struct zipentry *ze;
+
++ current_time = time(NULL);
++ if(current_time == (time_t)-1)
++ exit_on_error("time");
++
+ mod_time = unix2dostime(&current_time);
+
+ /* If we are creating a new manifest, create a META-INF directory entry */
+@@ -828,10 +832,6 @@ int make_manifest(int jfd, const char *m
+
+ memset((file_header + 12), '\0', 16); /*clear mod time, crc, size fields*/
+
+- current_time = time(NULL);
+- if(current_time == (time_t)-1)
+- exit_on_error("time");
+-
+ PACK_UB2(file_header, LOC_EXTRA, 0);
+ PACK_UB2(file_header, LOC_COMP, 0);
+ PACK_UB2(file_header, LOC_FNLEN, nlen);