Permalink
Browse files

- Fixed crash when NULL is passed to locale_accept_from_http()

  • Loading branch information...
1 parent 2f469e8 commit fcd87bc3a119127938031089f010f183105d986b @felipensp felipensp committed Jul 30, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 ext/intl/locale/locale_methods.c
@@ -1668,7 +1668,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);

0 comments on commit fcd87bc

Please sign in to comment.