cvs: php4 /ext/standard html.c
| From: | Rasmus Lerdorf | Date: | Mon, 03 Jun 2002 18:26:28 +0000 |
| Subject: | cvs: php4 /ext/standard html.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-12212@lists.php.net to get a copy of this message | ||
rasmus Mon Jun 3 14:26:28 2002 EDT
Modified files:
/php4/ext/standard html.c
Log:
Make sure len is defined here
Index: php4/ext/standard/html.c
diff -u php4/ext/standard/html.c:1.46 php4/ext/standard/html.c:1.47
--- php4/ext/standard/html.c:1.46 Sun May 5 19:06:39 2002
+++ php4/ext/standard/html.c Mon Jun 3 14:26:27 2002
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: html.c,v 1.46 2002/05/05 23:06:39 wez Exp $ */
+/* $Id: html.c,v 1.47 2002/06/03 18:26:27 rasmus Exp $ */
#include "php.h"
#include "reg.h"
@@ -526,7 +526,7 @@
{
int i;
enum entity_charset charset = cs_8859_1;
- int len;
+ int len = 0;
/* Guarantee default behaviour for backwards compatibility */
if (charset_hint == NULL)
@@ -573,6 +573,7 @@
#endif
}
if (charset_hint) {
+ if(!len) len = strlen(charset_hint);
/* now walk the charset map and look for the codeset */
for (i = 0; charset_map[i].codeset; i++) {
if (strncasecmp(charset_hint, charset_map[i].codeset, len) == 0) {