felipe          Wed Jul 30 16:43:11 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/intl/locale    locale_methods.c 
  Log:
  - Fixed crash when NULL is passed to locale_accept_from_http()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/intl/locale/locale_methods.c?r1=1.1.2.4&r2=1.1.2.5&diff_format=u
Index: php-src/ext/intl/locale/locale_methods.c
diff -u php-src/ext/intl/locale/locale_methods.c:1.1.2.4 
php-src/ext/intl/locale/locale_methods.c:1.1.2.5
--- php-src/ext/intl/locale/locale_methods.c:1.1.2.4    Fri Jul 25 12:41:57 2008
+++ php-src/ext/intl/locale/locale_methods.c    Wed Jul 30 16:43:11 2008
@@ -1668,7 +1668,7 @@
                                                &outResult, http_accept, 
available, &status);
        uenum_close(available);
        INTL_CHECK_STATUS(status, "locale_accept_from_http: failed to find 
acceptable locale");
-       if(outResult == ULOC_ACCEPT_FAILED) {
+       if (len < 0 || outResult == ULOC_ACCEPT_FAILED) {
                RETURN_FALSE;
        }
        RETURN_STRINGL(resultLocale, len, 1);



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

Reply via email to