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