cvs: php-src(PHP_5_3) /ext/intl/locale locale_methods.c
| From: | Felipe Pena | Date: | Wed, 30 Jul 2008 16:43:11 +0000 |
| Subject: | cvs: php-src(PHP_5_3) /ext/intl/locale locale_methods.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-51775@lists.php.net to get a copy of this message | ||
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);