diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2005-06-21 00:12:35 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2005-06-21 00:12:35 +0000 |
commit | a462e687dc8d9802c4f712b5c5f825d629027809 (patch) | |
tree | 1daeaaf3177bd047959faa5cb9cd54ac893b1cfe /sapi/cli/php_cli.c | |
parent | 79d649e17323f4fa6bd234f4cdf609a99e91435a (diff) | |
download | php-git-a462e687dc8d9802c4f712b5c5f825d629027809.tar.gz |
Fixed possible memory corruption.
Diffstat (limited to 'sapi/cli/php_cli.c')
-rw-r--r-- | sapi/cli/php_cli.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index a0b9cfaaa2..6fe4922e73 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -213,6 +213,9 @@ static int sapi_cli_ub_write(const char *str, uint str_length TSRMLS_DC) size_t ret; #if HAVE_LIBREADLINE || HAVE_LIBEDIT + if (!str_length) { + return 0; + } php_last_char = str[str_length-1]; #endif |