diff options
author | Derick Rethans <derick@php.net> | 2001-12-23 01:59:10 +0000 |
---|---|---|
committer | Derick Rethans <derick@php.net> | 2001-12-23 01:59:10 +0000 |
commit | b498ec567cb76403885da8cb79016787dff2d1a5 (patch) | |
tree | 9ba929e8d6c60f691c801d58128f86e265690009 | |
parent | ed7ce6c111aa466011229cdc7d9dd686458f1895 (diff) | |
download | php-git-b498ec567cb76403885da8cb79016787dff2d1a5.tar.gz |
- Fix for bug 14554 - segfault upon zip_entry_open. (patch by
phpbug@robin.pfft.net)
-rw-r--r-- | ext/zip/zip.c | 6 |
1 files changed, 4 insertions, 2 deletions
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); |