php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #65947
Patch mt19937ar.out revision 2013-12-12 18:54 UTC by dree031 at yahoo dot ca
Patch bug65947-2.patch revision 2013-11-06 08:41 UTC by laruence@php.net
Patch bug65947.patch revision 2013-11-05 13:40 UTC by laruence@php.net

Patch bug65947-2.patch for Filesystem function related Bug #65947

Patch version 2013-11-06 08:41 UTC

Return to Bug #65947 | Download this patch
Patch Revisions:

Developer: laruence@php.net

diff --git a/ext/standard/string.c b/ext/standard/string.c
index c744cb4..b5f3f29 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -1420,6 +1420,9 @@ PHPAPI void php_basename(const char *s, size_t len, char *suffix, size_t sufflen
 	c = comp = cend = (char*)s;
 	cnt = len;
 	state = 0;
+#if defined(_REENTRANT) && defined(HAVE_MBRLEN) && defined(HAVE_MBSTATE_T)
+	memset(&BG(mblen_state), 0, sizeof(BG(mblen_state)));
+#endif
 	while (cnt > 0) {
 		inc_len = (*c == '\0' ? 1: php_mblen(c, cnt));
 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC