From ee86a20296b9f606e37edaecc362d7503137c105 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Fri, 2 Jan 2009 00:10:20 +0000 Subject: - fix filename property read --- ext/zip/php_zip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ext/zip/php_zip.c') 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); } -- cgit v1.2.1