com php-src: - Fixed possible NULL ptr dereference: ext/phar/util.c
| From: | Felipe Pena | Date: | Sun, 20 Oct 2013 11:04:24 +0000 |
| Subject: | com php-src: - Fixed possible NULL ptr dereference: ext/phar/util.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-73737@lists.php.net to get a copy of this message | ||
Commit: 52555a78946cd91034f86eb4ad03c2d76cbef0cd
Author: Felipe Pena <felipensp@gmail.com> Sun, 20 Oct 2013 09:04:24 -0200
Parents: b6feabc8c64377f621448a65564bdf33d0de6866
Branches: PHP-5.4 PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=52555a78946cd91034f86eb4ad03c2d76cbef0cd
Log:
- Fixed possible NULL ptr dereference
Changed paths:
M ext/phar/util.c
Diff:
diff --git a/ext/phar/util.c b/ext/phar/util.c
index 898d8bd..227bd15 100644
--- a/ext/phar/util.c
+++ b/ext/phar/util.c
@@ -1262,8 +1262,10 @@ alias_success:
spprintf(error, 0, "alias \"%s\" is already used for archive \"%s\"
cannot be overloaded with \"%s\"", alias, (*fd_ptr)->fname, fname);
}
if (SUCCESS == phar_free_alias(*fd_ptr, alias, alias_len TSRMLS_CC)) {
- efree(*error);
- *error = NULL;
+ if (error) {
+ efree(*error);
+ *error = NULL;
+ }
}
return FAILURE;
}