com php-src: fix memory error: phpdbg_prompt.c
| From: | Bob Weinand | Date: | Sat, 23 Nov 2013 13:35:54 +0000 |
| Subject: | com php-src: fix memory error: phpdbg_prompt.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-74695@lists.php.net to get a copy of this message | ||
Commit: 86faf2e1b6392e36862d02e57b73bc2161ca720e
Author: krakjoe <joe.watkins@live.co.uk> Sat, 23 Nov 2013 13:35:54 +0000
Parents: 42b372431b63294672ef1a1ac5c31c09622ff785
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=86faf2e1b6392e36862d02e57b73bc2161ca720e
Log:
fix memory error
Changed paths:
M phpdbg_prompt.c
Diff:
diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c
index 47536a0..056db99 100644
--- a/phpdbg_prompt.c
+++ b/phpdbg_prompt.c
@@ -93,7 +93,7 @@ void phpdbg_init(char *init_file, size_t init_file_len, zend_bool use_default TS
while (fgets(cmd, PHPDBG_MAX_CMD, fp) != NULL) {
cmd_len = strlen(cmd)-1;
- while (*cmd && isspace(cmd[cmd_len-1]))
+ while (cmd && isspace(cmd[cmd_len-1]))
cmd_len--;
cmd[cmd_len] = '\0';