Re: cvs: php-src(PHP_5_3) /ext/hash hash.c

From: Date: Fri, 04 Jul 2008 23:21:33 +0000
Subject: Re: cvs: php-src(PHP_5_3) /ext/hash hash.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-50794@lists.php.net to get a copy of this message
This causes all the mhash tests to fail as it registers a 128 character constant since REGISTER_LONG_CONSTANT does sizeof(name) for the length. Scott Pierre-Alain Joye wrote:
pajoye Fri Jul 4 21:00:17 2008 UTC
  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/hash	hash.c   Log:
- fix compile error with vc6 (snaps) http://cvs.php.net/viewvc.cgi/php-src/ext/hash/hash.c?r1=1.18.2.5.2.7.2.8&r2=1.18.2.5.2.7.2.9&diff_format=u Index: php-src/ext/hash/hash.c diff -u php-src/ext/hash/hash.c:1.18.2.5.2.7.2.8 php-src/ext/hash/hash.c:1.18.2.5.2.7.2.9 --- php-src/ext/hash/hash.c:1.18.2.5.2.7.2.8 Tue Jul 1 07:41:38 2008 +++ php-src/ext/hash/hash.c Fri Jul 4 21:00:16 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: hash.c,v 1.18.2.5.2.7.2.8 2008/07/01 07:41:38 tony2001 Exp $ */ +/* $Id: hash.c,v 1.18.2.5.2.7.2.9 2008/07/04 21:00:16 pajoye Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -621,7 +621,7 @@ len = slprintf(buf, 127, "MHASH_%s", algorithm.mhash_name, strlen(algorithm.mhash_name)); { - char name[len+1]; + char name[128]; memcpy(name, buf, len+1); REGISTER_LONG_CONSTANT(name, algorithm.value, CONST_CS | CONST_PERSISTENT); }


« previous php.cvs (#50794) next »