]> granicus.if.org Git - php/commitdiff
- fix Fixed NULL pointer dereference in ZipArchive::getArchiveComment, (CVE-2010...
authorPierre Joye <pajoye@php.net>
Tue, 19 Oct 2010 09:56:11 +0000 (09:56 +0000)
committerPierre Joye <pajoye@php.net>
Tue, 19 Oct 2010 09:56:11 +0000 (09:56 +0000)
ext/zip/php_zip.c

index c1b1c95a31a9160f2122ae8c5da42e5a1222bea3..522e92d34f4360e86b3a2a0031b50b7e895e69a9 100644 (file)
@@ -1974,6 +1974,9 @@ static ZIPARCHIVE_METHOD(getArchiveComment)
        }
 
        comment = zip_get_archive_comment(intern, &comment_len, (int)flags);
+       if(comment==NULL) {
+               RETURN_FALSE;
+       }
        RETURN_STRINGL((char *)comment, (long)comment_len, 1);
 }
 /* }}} */