diff options
| author | Felipe Pena <felipe@php.net> | 2010-12-10 00:47:51 +0000 |
|---|---|---|
| committer | Felipe Pena <felipe@php.net> | 2010-12-10 00:47:51 +0000 |
| commit | 43cfda93eba8bf5e10a38fb087197bf8ad408222 (patch) | |
| tree | ed5827d0789a4fdbfd80aa27518e570c26861e40 | |
| parent | 127a878fc9010473a05b30aca8431249b3cfb0f5 (diff) | |
| download | php-git-43cfda93eba8bf5e10a38fb087197bf8ad408222.tar.gz | |
- Fixed bug #53512 (NumberFormatter::setSymbol crash on bogus $attr values)
| -rwxr-xr-x | ext/intl/formatter/formatter_attr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/intl/formatter/formatter_attr.c b/ext/intl/formatter/formatter_attr.c index 851b2b310e..46d61fb1fc 100755 --- a/ext/intl/formatter/formatter_attr.c +++ b/ext/intl/formatter/formatter_attr.c @@ -311,6 +311,11 @@ PHP_FUNCTION( numfmt_set_symbol ) RETURN_FALSE; } + + if (symbol >= UNUM_FORMAT_SYMBOL_COUNT || symbol < 0) { + intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "numfmt_set_symbol: invalid symbol value", 0 TSRMLS_CC ); + RETURN_FALSE; + } /* Fetch the object. */ FORMATTER_METHOD_FETCH_OBJECT; |
