cvs: pecl /phar util.c

From: Date: Fri, 01 Feb 2008 11:36:44 +0000
Subject: cvs: pecl /phar util.c
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-9654@lists.php.net to get a copy of this message
tony2001 Fri Feb 1 11:36:44 2008 UTC Modified files: /pecl/phar util.c Log: check for empty/null path still some leaks are left http://cvs.php.net/viewvc.cgi/pecl/phar/util.c?r1=1.2&r2=1.3&diff_format=u Index: pecl/phar/util.c diff -u pecl/phar/util.c:1.2 pecl/phar/util.c:1.3 --- pecl/phar/util.c:1.2 Mon Jan 28 20:18:13 2008 +++ pecl/phar/util.c Fri Feb 1 11:36:44 2008 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: util.c,v 1.2 2008/01/28 20:18:13 cellog Exp $ */ +/* $Id: util.c,v 1.3 2008/02/01 11:36:44 tony2001 Exp $ */ #include "phar_internal.h" @@ -192,7 +192,7 @@ phar_entry_info *entry, etemp; phar_entry_data *ret; const char *pcr_error; - char is_dir = path[path_len - 1] == '/'; + char is_dir = (path_len > 0 && path != NULL) ? path[path_len - 1] == '/' : 0; if (FAILURE == phar_get_archive(&phar, fname, fname_len, NULL, 0, error TSRMLS_CC)) { return NULL;

« previous php.pecl.cvs (#9654) next »