]> 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:55:36 +0000 (09:55 +0000)
committerPierre Joye <pajoye@php.net>
Tue, 19 Oct 2010 09:55:36 +0000 (09:55 +0000)
ext/zip/php_zip.c

index 76aa9b7aeb6ee17ac88422a561137d9adbac644e..dc920ef925e1a08be492f89decbba0532b1d6897 100644 (file)
@@ -1961,6 +1961,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);
 }
 /* }}} */