File libzip-0.9-CVE-2011-0421.patch of Package libzip1.import4188

Index: libzip-0.9/lib/zip_name_locate.c
===================================================================
--- libzip-0.9/lib/zip_name_locate.c	2007-11-07 14:33:45.000000000 +0100
+++ libzip-0.9/lib/zip_name_locate.c	2011-03-21 10:36:21.149985060 +0100
@@ -59,6 +59,10 @@
 	_zip_error_set(error, ZIP_ER_INVAL, 0);
 	return -1;
     }
+
+    if((flags & ZIP_FL_UNCHANGED) && !za->cdir) {
+        return -1;
+    }
     
     cmp = (flags & ZIP_FL_NOCASE) ? strcasecmp : strcmp;
openSUSE Build Service is sponsored by