diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2003-09-11 05:07:26 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2003-09-11 05:07:26 +0000 |
commit | ef23b497d42826cf2230e29d6fc00ea143097b4d (patch) | |
tree | 99db0297fa8e0c86b64d0210c14537a58a3b3241 | |
parent | f3f3b772b28e5565928c02ec8c98d96865036165 (diff) | |
download | php-git-ef23b497d42826cf2230e29d6fc00ea143097b4d.tar.gz |
Fixed bug #25316 (Possible infinite loop inside _php_stream_write()).
-rwxr-xr-x | main/streams/streams.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/main/streams/streams.c b/main/streams/streams.c index 90e77b710e..5591928470 100755 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -867,7 +867,8 @@ static size_t _php_stream_write_buffer(php_stream *stream, const char *buf, size justwrote = stream->ops->write(stream, buf, towrite TSRMLS_CC); - if (justwrote > 0) { + /* convert justwrote to an integer, since normally it is unsigned */ + if ((int)justwrote > 0) { buf += justwrote; count -= justwrote; didwrite += justwrote; |