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