diff options
author | Pierre Joye <pajoye@php.net> | 2009-01-02 00:10:20 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2009-01-02 00:10:20 +0000 |
commit | ee86a20296b9f606e37edaecc362d7503137c105 (patch) | |
tree | a934131a13570eb40b7a74f28154da7e3d13c5c3 /ext/zip/php_zip.c | |
parent | d00fb8b360e5ef776dacc97301be3affe91dfb22 (diff) | |
download | php-git-ee86a20296b9f606e37edaecc362d7503137c105.tar.gz |
- fix filename property read
Diffstat (limited to 'ext/zip/php_zip.c')
-rw-r--r-- | ext/zip/php_zip.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 8faa0cf0f9..b970b62ec8 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -442,6 +442,7 @@ static int php_zip_get_num_files(struct zip *za TSRMLS_DC) /* {{{ */ static char * php_zipobj_get_filename(ze_zip_object *obj TSRMLS_DC) /* {{{ */ { + if (!obj) { return NULL; } @@ -791,7 +792,7 @@ static int php_zip_property_reader(ze_zip_object *obj, zip_prop_handler *hnd, zv switch (hnd->type) { case IS_STRING: if (retchar) { - ZVAL_STRINGL(*retval, (char *) retchar, len, 1); + ZVAL_STRING(*retval, (char *) retchar, 1); } else { ZVAL_EMPTY_STRING(*retval); } |