From: Derick Rethans Date: Sun, 23 Dec 2001 01:59:10 +0000 (+0000) Subject: - Fix for bug 14554 - segfault upon zip_entry_open. (patch by X-Git-Tag: PRE_ISSET_PATCH~440 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b498ec567cb76403885da8cb79016787dff2d1a5;p=php - Fix for bug 14554 - segfault upon zip_entry_open. (patch by phpbug@robin.pfft.net) --- diff --git a/ext/zip/zip.c b/ext/zip/zip.c index bc7d9a9257..78f8eed40e 100644 --- a/ext/zip/zip.c +++ b/ext/zip/zip.c @@ -250,10 +250,12 @@ PHP_FUNCTION(zip_entry_open) zval *zzip_ent; ZZIP_DIR *archive_p = NULL; php_zzip_dirent *entry = NULL; - int mode; + char *mode; + int mode_len; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr|l", &zzip_dp, &zzip_ent, &mode) == FAILURE) + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr|s", &zzip_dp, &zzip_ent, &mode, &mode_len) == FAILURE) { return; + } ZEND_FETCH_RESOURCE(archive_p, ZZIP_DIR *, &zzip_dp, -1, le_zip_dir_name, le_zip_dir); ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, &zzip_ent, -1, le_zip_entry_name, le_zip_entry);