From 39a1c0e86d4a48034bab4a1621459e9cef940d2c Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Wed, 30 Jul 2008 17:56:18 +0000 Subject: [PATCH] - MFB: Fixed crash when NULL is passed to locale_accept_from_http() --- ext/intl/locale/locale_methods.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c index 60c6d19e99..7ee16dd8a1 100755 --- a/ext/intl/locale/locale_methods.c +++ b/ext/intl/locale/locale_methods.c @@ -1692,7 +1692,7 @@ PHP_FUNCTION(locale_accept_from_http) &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); -- 2.50.1