com php-src: Also check for length to not segfault: phpdbg_prompt.c
| From: | Bob Weinand | Date: | Wed, 16 Apr 2014 18:55:02 +0000 |
| Subject: | com php-src: Also check for length to not segfault: phpdbg_prompt.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-76988@lists.php.net to get a copy of this message | ||
Commit: 2ab2b74af3344f076248c5c5574c7b814a2b44fc
Author: Bob Weinand <bobwei9@hotmail.com> Wed, 16 Apr 2014 20:55:02 +0200
Parents: b1a22ae6dc2b9d530b385661d56d62ae584a1016
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2ab2b74af3344f076248c5c5574c7b814a2b44fc
Log:
Also check for length to not segfault
Changed paths:
M phpdbg_prompt.c
Diff:
diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c
index 86fc4d7..da06c71 100644
--- a/phpdbg_prompt.c
+++ b/phpdbg_prompt.c
@@ -645,7 +645,7 @@ PHPDBG_COMMAND(run) /* {{{ */
/* reset hit counters */
phpdbg_reset_breakpoints(TSRMLS_C);
- if (param && param->type != EMPTY_PARAM) {
+ if (param && param->type != EMPTY_PARAM && param->len != 0) {
char **argv = emalloc(5 * sizeof(char *));
int argc = 0;
int i;