diff options
author | Gustavo André dos Santos Lopes <cataphract@php.net> | 2012-04-07 16:32:19 +0100 |
---|---|---|
committer | Gustavo André dos Santos Lopes <cataphract@php.net> | 2012-04-07 16:32:19 +0100 |
commit | 0f180a63ebb2d65bbe49b68d2430639b20443e9a (patch) | |
tree | 847b20838d4b848b48424e6e955c753d6bd340e6 /main/streams | |
parent | 9bf8cd4b3437f6335e20843c9e3668b44761feba (diff) | |
download | php-git-0f180a63ebb2d65bbe49b68d2430639b20443e9a.tar.gz |
Fixed bug in new stream_get_line() when using NUL as a delimiter.
This is the issue Derick spotted a few days ago..
Diffstat (limited to 'main/streams')
-rwxr-xr-x | main/streams/streams.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/streams/streams.c b/main/streams/streams.c index 639ea075a0..116c0aa045 100755 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -957,8 +957,8 @@ PHPAPI char *php_stream_get_record(php_stream *stream, size_t maxlen, size_t *re char *ret_buf, /* returned buffer */ *found_delim = NULL; size_t buffered_len, - tent_ret_len; /* tentative returned length*/ - int has_delim = delim_len > 0 && delim[0] != '\0'; + tent_ret_len; /* tentative returned length */ + int has_delim = delim_len > 0; if (maxlen == 0) { return NULL; |