Blame SOURCES/fastjar-0.97-segfault.patch
|
|
543165 |
2009-01-14 Jakub Jelinek <jakub@redhat.com>
|
|
|
543165 |
|
|
|
543165 |
* jartool.c (make_manifest): Initialize current_time before
|
|
|
543165 |
calling unix2dostime on it.
|
|
|
543165 |
|
|
|
543165 |
--- fastjar-0.97/jartool.c.jj 2008-10-15 18:35:37.000000000 +0200
|
|
|
543165 |
+++ fastjar-0.97/jartool.c 2009-01-14 15:40:50.000000000 +0100
|
|
|
543165 |
@@ -820,6 +820,10 @@ int make_manifest(int jfd, const char *m
|
|
|
543165 |
int mod_time; /* file modification time */
|
|
|
543165 |
struct zipentry *ze;
|
|
|
543165 |
|
|
|
543165 |
+ current_time = time(NULL);
|
|
|
543165 |
+ if(current_time == (time_t)-1)
|
|
|
543165 |
+ exit_on_error("time");
|
|
|
543165 |
+
|
|
|
543165 |
mod_time = unix2dostime(¤t_time);
|
|
|
543165 |
|
|
|
543165 |
/* If we are creating a new manifest, create a META-INF directory entry */
|
|
|
543165 |
@@ -828,10 +832,6 @@ int make_manifest(int jfd, const char *m
|
|
|
543165 |
|
|
|
543165 |
memset((file_header + 12), '\0', 16); /*clear mod time, crc, size fields*/
|
|
|
543165 |
|
|
|
543165 |
- current_time = time(NULL);
|
|
|
543165 |
- if(current_time == (time_t)-1)
|
|
|
543165 |
- exit_on_error("time");
|
|
|
543165 |
-
|
|
|
543165 |
PACK_UB2(file_header, LOC_EXTRA, 0);
|
|
|
543165 |
PACK_UB2(file_header, LOC_COMP, 0);
|
|
|
543165 |
PACK_UB2(file_header, LOC_FNLEN, nlen);
|