Hello community,

here is the log from the commit of package zip for openSUSE:Factory checked in 
at 2017-12-03 10:08:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/zip (Old)
 and      /work/SRC/openSUSE:Factory/.zip.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "zip"

Sun Dec  3 10:08:38 2017 rev:23 rq:546292 version:3.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/zip/zip.changes  2015-07-05 17:56:02.000000000 
+0200
+++ /work/SRC/openSUSE:Factory/.zip.new/zip.changes     2017-12-03 
10:08:39.545377468 +0100
@@ -1,0 +2,6 @@
+Tue Nov 28 16:29:02 UTC 2017 - [email protected]
+
+- add zip-3.0-fix-memory_leaks.patch to fix memory leaks in zip.c,
+  zipfile.c and fileio.c files [bsc#1068346]
+
+-------------------------------------------------------------------

New:
----
  zip-3.0-fix-memory_leaks.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ zip.spec ++++++
--- /var/tmp/diff_new_pack.FR8REw/_old  2017-12-03 10:08:40.225352746 +0100
+++ /var/tmp/diff_new_pack.FR8REw/_new  2017-12-03 10:08:40.225352746 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package zip
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -32,6 +32,8 @@
 Patch6:         zip-3.0-tempfile.patch
 Patch7:         zip-notimestamp.patch
 Patch8:         zip-3.0-nomutilation.patch
+# PATCH-FIX-UPSTREAM bsc#1068346 [email protected] -- fix memory leaks
+Patch9:         zip-3.0-fix-memory_leaks.patch
 Provides:       crzip = %{version}
 Obsoletes:      crzip < %{version}
 BuildRequires:  libbz2-devel
@@ -50,6 +52,7 @@
 %patch6
 %patch7
 %patch8
+%patch9
 
 %build
 make %{?_smp_mflags} -f unix/Makefile prefix=/usr CC="gcc %{optflags} 
-DLARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" generic_gcc

++++++ zip-3.0-fix-memory_leaks.patch ++++++
--- zipfile.c   
+++ zipfile.c   
@@ -2166,7 +2166,7 @@ int readlocal(localz, z)
 #ifndef UTIL
   ulg start_disk = 0;
   uzoff_t start_offset = 0;
-  char *split_path;
+  char *split_path = NULL;
 
   start_disk = z->dsk;
   start_offset = z->off;
@@ -2197,6 +2197,7 @@ int readlocal(localz, z)
       split_path = get_in_split_path(in_path, start_disk);
     }
   }
+  if (split_path) free(split_path);
 #endif
 
   /* For utilities assume archive is on one disk for now */
@@ -6014,7 +6015,7 @@ int zipcopy(z)
   ulg e = 0;            /* extended local header size */
   ulg start_disk = 0;
   uzoff_t start_offset = 0;
-  char *split_path;
+  char *split_path = NULL;
   char buf[LOCHEAD + 1];
   struct zlist far *localz;
   int r;
@@ -6063,6 +6064,7 @@ int zipcopy(z)
         split_path = get_in_split_path(in_path, start_disk);
       }
     }
+    if (split_path) free(split_path);
 
     if (zfseeko(in_file, start_offset, SEEK_SET) != 0) {
       fclose(in_file);
--- zip.c       
+++ zip.c       
@@ -3450,6 +3450,7 @@ char **argv;            /* command line
                 }
               }
               */
+              free(value);  /* Added by Polo from forum */
               if (kk == 3) {
                 first_listarg = argnum;
                 kk = 4;
--- fileio.c    
+++ fileio.c    
@@ -696,6 +696,7 @@ int newnamew(namew, isdir, casesensitive
         return ZE_MEM;
       }
       strcpy(z->name, name);
+      if (z->oname) free(z->oname);
       z->oname = oname;
       oname = NULL;
       z->dosflag = dosflag;
@@ -959,6 +960,7 @@ int newname(name, isdir, casesensitive)
         return ZE_MEM;
       }
       strcpy(z->name, name);
+      if (z->oname) free(z->oname);
       z->oname = oname;
       z->dosflag = dosflag;
 


Reply via email to