cvs: php4 /ext/standard file.c

From: Date: Fri, 07 Jul 2000 09:06:47 +0000
Subject: cvs: php4 /ext/standard file.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-658@lists.php.net to get a copy of this message
stas Fri Jul 7 02:06:47 2000 EDT Modified files: /php4/ext/standard file.c Log: Fix fgets re-allocation (add +1 to accomondate ending \0). Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.98 php4/ext/standard/file.c:1.99 --- php4/ext/standard/file.c:1.98 Sun Jul 2 08:12:34 2000 +++ php4/ext/standard/file.c Fri Jul 7 02:06:47 2000 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.98 2000/07/02 15:12:34 andi Exp $ */ +/* $Id: file.c,v 1.99 2000/07/07 09:06:47 stas Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -993,7 +993,7 @@ return_value->value.str.len = strlen(return_value->value.str.val); /* resize buffer if it's much larger than the result */ if(return_value->value.str.len < len/2) { - return_value->value.str.val = erealloc(buf,return_value->value.str.len); + return_value->value.str.val = erealloc(buf,return_value->value.str.len+1); } } return_value->type = IS_STRING;

« previous php.cvs (#658) next »