Bug #14554 Updated: segfault when reading a zip file

From: Date: Mon, 11 Mar 2002 01:53:41 +0000
Subject: Bug #14554 Updated: segfault when reading a zip file
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-2176@lists.php.net to get a copy of this message
ID: 14554 Updated by: phpbug@robin.pfft.net Reported By: phpbug@robin.pfft.net Status: Closed Bug Type: ZZiplib Related Operating System: linux PHP Version: 4.1.0 New Comment: 4.1.2 that is Previous Comments: ------------------------------------------------------------------------ [2002-03-10 20:52:10] phpbug@robin.pfft.net Guys.. 4.2.0 was released without that fix! ------------------------------------------------------------------------ [2001-12-22 20:59:31] derick@php.net Applied the patch. Thx ! Derick ------------------------------------------------------------------------ [2001-12-22 18:52:20] phpbug@robin.pfft.net Also sent to derick@php.net > cvs diff -u cvs server: Diffing . Index: zip.c =================================================================== RCS file: /repository/php4/ext/zip/zip.c,v retrieving revision 1.27 diff -u -r1.27 zip.c --- zip.c 11 Dec 2001 15:30:57 -0000 1.27 +++ zip.c 22 Dec 2001 23:47:17 -0000 @@ -250,9 +250,10 @@ 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); ------------------------------------------------------------------------ [2001-12-22 15:44:27] sander@php.net Can you send a new patch which fixes that zip_entry_open thingy to Derick? He'll handle it. ------------------------------------------------------------------------ [2001-12-17 10:31:51] phpbug@robin.pfft.net It seems to be fixed in the current CVS tree (except for the third argument to zip_entry_open(), which is optional). ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/14554 -- Edit this bug report at http://bugs.php.net/?id=14554&edit=1

« previous php.bugs (#2176) next »