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

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