shane Sun Oct 27 18:34:48 2002 EDT Modified files: /php4/main streams.c Log: dont memmove a null pointer. caught by bounds checker. Index: php4/main/streams.c diff -u php4/main/streams.c:1.118 php4/main/streams.c:1.119 --- php4/main/streams.c:1.118 Sun Oct 27 18:01:45 2002 +++ php4/main/streams.c Sun Oct 27 18:34:48 2002 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streams.c,v 1.118 2002/10/27 23:01:45 shane Exp $ */ +/* $Id: streams.c,v 1.119 2002/10/27 23:34:48 shane Exp $ */ #define _GNU_SOURCE #include "php.h" @@ -469,7 +469,7 @@ /* no; so lets fetch more data */ /* reduce buffer memory consumption if possible, to avoid a realloc */ - if (stream->readbuflen - stream->writepos < stream->chunk_size) { + if (stream->readbuf && stream->readbuflen - stream->writepos < +stream->chunk_size) { memmove(stream->readbuf, stream->readbuf + stream->readpos, stream->readbuflen - stream->readpos); stream->writepos -= stream->readpos; stream->readpos = 0;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php