]> granicus.if.org Git - php/commitdiff
Fix thread safety
authorAnatol Belski <ab@php.net>
Thu, 21 Sep 2017 08:32:09 +0000 (10:32 +0200)
committerAnatol Belski <ab@php.net>
Thu, 21 Sep 2017 08:32:09 +0000 (10:32 +0200)
main/main.c

index 6050d0db317139bb94dfe73f637b0de0276d3d39..48c1a63c727531613ba24499c3dc2206bd111543 100644 (file)
@@ -127,8 +127,8 @@ PHPAPI int core_globals_id;
 #define SAFE_FILENAME(f) ((f)?(f):"-")
 
 static char *get_safe_charset_hint(void) {
-       static char *lastHint = NULL;
-       static char *lastCodeset = NULL;
+       ZEND_TLS char *lastHint = NULL;
+       ZEND_TLS char *lastCodeset = NULL;
        char *hint = SG(default_charset);
        size_t len = strlen(hint);
        size_t i = 0;