felipe          Wed Jul 30 19:33:04 2008 UTC

  Modified files:              
    /php-src/ext/intl/locale    locale_methods.c 
  Log:
  - Fixed memory leak.
    # Test: locale_filter_matches(str_repeat('a', 520), str_repeat('a', 520), 
1);
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/intl/locale/locale_methods.c?r1=1.7&r2=1.8&diff_format=u
Index: php-src/ext/intl/locale/locale_methods.c
diff -u php-src/ext/intl/locale/locale_methods.c:1.7 
php-src/ext/intl/locale/locale_methods.c:1.8
--- php-src/ext/intl/locale/locale_methods.c:1.7        Wed Jul 30 17:56:18 2008
+++ php-src/ext/intl/locale/locale_methods.c    Wed Jul 30 19:33:04 2008
@@ -1319,7 +1319,7 @@
                }
 
                //Convert to lower case for case-insensitive comparison
-               cur_lang_tag = ecalloc( 1, strlen(lang_tag ) + 1);
+               cur_lang_tag = ecalloc( 1, strlen(can_lang_tag) + 1);
 
                //Convert to lower case for case-insensitive comparison
                result = strToMatch( can_lang_tag , cur_lang_tag);
@@ -1329,7 +1329,7 @@
                        RETURN_FALSE;
                }
 
-               cur_loc_range = ecalloc( 1, strlen(loc_range ) + 1);
+               cur_loc_range = ecalloc( 1, strlen(can_loc_range) + 1);
                result = strToMatch( can_loc_range , cur_loc_range );
                if( result == 0) {
                        efree( cur_lang_tag );



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to