Browse Source

- Fixed crash when NULL is passed to locale_accept_from_http()

PECL
Felipe Pena 18 years ago
parent
commit
fcd87bc3a1
  1. 2
      ext/intl/locale/locale_methods.c

2
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);

Loading…
Cancel
Save