CBL-Mariner/SPECS/zip/CVE-2018-13410.patch

13 строки
523 B
Diff

diff -Nur zip30.orig/zip.c zip30/zip.c
--- zip30.orig/zip.c 2008-07-05 09:34:06.000000000 -0700
+++ zip30/zip.c 2020-05-04 18:45:24.079901253 -0700
@@ -1437,7 +1437,7 @@
/* Replace first {} with archive name. If no {} append name to string. */
here = strstr(unzip_path, "{}");
- if ((cmd = malloc(strlen(unzip_path) + strlen(zipname) + 3)) == NULL) {
+ if ((cmd = malloc(strlen(unzip_path) + strlen(zipname) + 4)) == NULL) {
ziperr(ZE_MEM, "building command string for testing archive");
}