[mingw-libzip] Fix patch

Sandro Mani smani at fedoraproject.org
Mon Mar 23 16:40:53 UTC 2015


commit 7a2793ba7edb4bde5322ee491a9568a3f74b3c49
Author: Sandro Mani <manisandro at gmail.com>
Date:   Mon Mar 23 17:40:50 2015 +0100

    Fix patch

 libzip-0.11.2-CVE-2015-2331.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/libzip-0.11.2-CVE-2015-2331.patch b/libzip-0.11.2-CVE-2015-2331.patch
index 44aeb5a..67d2abc 100644
--- a/libzip-0.11.2-CVE-2015-2331.patch
+++ b/libzip-0.11.2-CVE-2015-2331.patch
@@ -6,7 +6,7 @@ diff -up libzip-0.11.2/lib/zip_dirent.c.CVE-2015-2331 libzip-0.11.2/lib/zip_dire
      if (nentry == 0)
  	cd->entry = NULL;
 -    else if ((cd->entry=(struct zip_entry *)malloc(sizeof(*(cd->entry))*(size_t)nentry)) == NULL) {
-+    else if ((nentry > SIZE_MAX/sizeof(*(cd->entry))) || (cd->entry=(zip_entry_t *)malloc(sizeof(*(cd->entry))*(size_t)nentry)) == NULL) {
++    else if ((nentry > SIZE_MAX/sizeof(*(cd->entry))) || (cd->entry=(struct zip_entry *)malloc(sizeof(*(cd->entry))*(size_t)nentry)) == NULL) {
  	_zip_error_set(error, ZIP_ER_MEMORY, 0);
  	free(cd);
  	return NULL;


More information about the scm-commits mailing list