com php-src: additional checks in is_*: phpdbg_utils. c
| From: | Bob Weinand | Date: | Thu, 14 Nov 2013 13:04:59 +0000 |
| Subject: | com php-src: additional checks in is_*: phpdbg_utils. c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-74972@lists.php.net to get a copy of this message | ||
Commit: 8e597eba07fac8600adb9ab5be19906dfb5f0a82
Author: krakjoe <joe.watkins@live.co.uk> Thu, 14 Nov 2013 13:04:59 +0000
Parents: 187d1c726bc58ff001ed4baf29b76de28a3e92fe
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8e597eba07fac8600adb9ab5be19906dfb5f0a82
Log:
additional checks in is_*
Changed paths:
M phpdbg_utils.c
Diff:
diff --git a/phpdbg_utils.c b/phpdbg_utils.c
index c61d38f..95a49e3 100644
--- a/phpdbg_utils.c
+++ b/phpdbg_utils.c
@@ -30,6 +30,9 @@ ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
int phpdbg_is_numeric(const char *str) /* {{{ */
{
+ if (!str)
+ return 0;
+
for (; *str; str++) {
if (isspace(*str)) {
continue;
@@ -41,6 +44,9 @@ int phpdbg_is_numeric(const char *str) /* {{{ */
int phpdbg_is_empty(const char *str) /* {{{ */
{
+ if (!str)
+ return 1;
+
for (; *str; str++) {
if (isspace(*str)) {
continue;