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