Blame SOURCES/unzip-6.0-cve-2018-18384.patch

85d061
--- unzip60/list.c	
85d061
+++ unzip60/list.c	
85d061
@@ -97,7 +97,7 @@ int list_files(__G)    /* return PK-type
85d061
 {
85d061
     int do_this_file=FALSE, cfactor, error, error_in_archive=PK_COOL;
85d061
 #ifndef WINDLL
85d061
-    char sgn, cfactorstr[10];
85d061
+    char sgn, cfactorstr[1+10+1+1];	/* <sgn><int>%NUL */
85d061
     int longhdr=(uO.vflag>1);
85d061
 #endif
85d061
     int date_format;
85d061
@@ -389,9 +389,9 @@ int list_files(__G)    /* return PK-type
85d061
             }
85d061
 #else /* !WINDLL */
85d061
             if (cfactor == 100)
85d061
-                sprintf(cfactorstr, LoadFarString(CompFactor100));
85d061
+                snprintf(cfactorstr, sizeof(cfactorstr), LoadFarString(CompFactor100));
85d061
             else
85d061
-                sprintf(cfactorstr, LoadFarString(CompFactorStr), sgn, cfactor);
85d061
+                snprintf(cfactorstr, sizeof(cfactorstr), LoadFarString(CompFactorStr), sgn, cfactor);
85d061
             if (longhdr)
85d061
                 Info(slide, 0, ((char *)slide, LoadFarString(LongHdrStats),
85d061
                   FmZofft(G.crec.ucsize, "8", "u"), methbuf,
85d061
@@ -471,9 +471,9 @@ int list_files(__G)    /* return PK-type
85d061
 
85d061
 #else /* !WINDLL */
85d061
         if (cfactor == 100)
85d061
-            sprintf(cfactorstr, LoadFarString(CompFactor100));
85d061
+            snprintf(cfactorstr, sizeof(cfactorstr), LoadFarString(CompFactor100));
85d061
         else
85d061
-            sprintf(cfactorstr, LoadFarString(CompFactorStr), sgn, cfactor);
85d061
+            snprintf(cfactorstr, sizeof(cfactorstr), LoadFarString(CompFactorStr), sgn, cfactor);
85d061
         if (longhdr) {
85d061
             Info(slide, 0, ((char *)slide, LoadFarString(LongFileTrailer),
85d061
               FmZofft(tot_ucsize, "8", "u"), FmZofft(tot_csize, "8", "u"),