From ef23b497d42826cf2230e29d6fc00ea143097b4d Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Thu, 11 Sep 2003 05:07:26 +0000 Subject: [PATCH] Fixed bug #25316 (Possible infinite loop inside _php_stream_write()). --- main/streams/streams.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.40.0