summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2003-09-11 05:07:26 +0000
committerIlia Alshanetsky <iliaa@php.net>2003-09-11 05:07:26 +0000
commitef23b497d42826cf2230e29d6fc00ea143097b4d (patch)
tree99db0297fa8e0c86b64d0210c14537a58a3b3241
parentf3f3b772b28e5565928c02ec8c98d96865036165 (diff)
downloadphp-git-ef23b497d42826cf2230e29d6fc00ea143097b4d.tar.gz
Fixed bug #25316 (Possible infinite loop inside _php_stream_write()).
-rwxr-xr-xmain/streams/streams.c3
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;