From: Pierre Joye Date: Fri, 2 Jan 2009 00:10:20 +0000 (+0000) Subject: - fix filename property read X-Git-Tag: php-5.3.0beta1~307 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ee86a20296b9f606e37edaecc362d7503137c105;p=php - fix filename property read --- 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); }