cvs: php4(PHP_4_2_0) /ext/bz2 bz2.c

From: Date: Fri, 29 Mar 2002 15:28:04 +0000
Subject: cvs: php4(PHP_4_2_0) /ext/bz2 bz2.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-10766@lists.php.net to get a copy of this message
sniper Fri Mar 29 10:28:04 2002 EDT Modified files: (Branch: PHP_4_2_0) /php4/ext/bz2 bz2.c Log: MFH fix for some bug Index: php4/ext/bz2/bz2.c diff -u php4/ext/bz2/bz2.c:1.35 php4/ext/bz2/bz2.c:1.35.2.1 --- php4/ext/bz2/bz2.c:1.35 Thu Feb 28 03:25:43 2002 +++ php4/ext/bz2/bz2.c Fri Mar 29 10:28:04 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: bz2.c,v 1.35 2002/02/28 08:25:43 sebastian Exp $ */ +/* $Id: bz2.c,v 1.35.2.1 2002/03/29 15:28:04 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -326,7 +326,8 @@ } else { /* Copy the buffer, we have perhaps allocate alot more than we need, so we erealloc() the buffer to the proper size */ - dest = erealloc(dest, size); + dest = erealloc(dest, size + 1); + dest[size] = 0; RETURN_STRINGL(dest, size, 0); } } @@ -391,7 +392,8 @@ } else { /* we might have allocated a little to much, so erealloc the buffer down to size, before returning it */ - dest = erealloc(dest, size); + dest = erealloc(dest, size + 1); + dest[size] = 0; RETURN_STRINGL(dest, size, 0); } }

« previous php.cvs (#10766) next »