File unzip-5.52-filename_too_long.patch of Package unzip

--- process.c
+++ process.c
@@ -156,8 +156,8 @@
 static ZCONST char Far ZipfileCommTrunc1[] =
   "\ncaution:  zipfile comment truncated\n";
 
-
-
+static ZCONST char Far FileNameTooLong[] =
+  "%s: error: %s (truncated): %s\n";
 
 /*******************************/
 /* Function process_zipfiles() */
@@ -314,6 +314,17 @@
 
         lastzipfn = G.zipfn;
 
+        if (strlen(G.wildzipfn) > strlen(G.zipfn))
+        {
+            Info(slide, 1, ((char *)slide,
+                            LoadFarString(FileNameTooLong),
+                            uO.zipinfo_mode? LoadFarStringSmall(Zipnfo) : LoadFarStringSmall(Unzip),
+                            G.zipfn, strerror(ENAMETOOLONG)));
+
+            free_G_buffers(__G);
+            return PK_NOZIP;
+        }
+
         /* print a blank line between the output of different zipfiles */
         if (!uO.qflag  &&  error != PK_NOZIP  &&  error != IZ_DIR
 #ifdef TIMESTAMP
openSUSE Build Service is sponsored by