cvs: php4 /main/streams streams.c

From: Date: Fri, 04 Apr 2003 01:33:58 +0000
Subject: cvs: php4 /main/streams streams.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-20065@lists.php.net to get a copy of this message
pollita Thu Apr 3 20:33:58 2003 EDT Modified files: /php4/main/streams streams.c Log: Prevent php_stream_get_record from grabbing more than maxlen characters Index: php4/main/streams/streams.c diff -u php4/main/streams/streams.c:1.16 php4/main/streams/streams.c:1.17 --- php4/main/streams/streams.c:1.16 Mon Mar 31 18:22:10 2003 +++ php4/main/streams/streams.c Thu Apr 3 20:33:58 2003 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streams.c,v 1.16 2003/03/31 23:22:10 moriyoshi Exp $ */ +/* $Id: streams.c,v 1.17 2003/04/04 01:33:58 pollita Exp $ */ #define _GNU_SOURCE #include "php.h" @@ -801,6 +801,10 @@ } else { toread = e - (char *) stream->readbuf; } + } + + if (toread > maxlen && maxlen > 0) { + toread = maxlen; } buf = emalloc(toread + 1);

« previous php.cvs (#20065) next »