File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 2
2
Bug #67252 (convert_uudecode out-of-bounds read)
3
3
--FILE--
4
4
<?php
5
-
6
- $ a = "M86%A86%A86%A86%A86%A86%A86%A86%A86%A86%A86%A86%A86%A86%A86%A " ."\n" ."a. " ;
7
- var_dump (convert_uudecode ($ a ));
8
-
5
+ try {
6
+ convert_uudecode ("M86%A86%A86%A86%A86%A86%A86%A86%A86%A86%A86%A86%A86%A86%A86%A " . "\n" . "a. " );
7
+ } catch (ValueError $ exception ) {
8
+ echo $ exception ->getMessage () . "\n" ;
9
+ }
9
10
?>
10
- --EXPECTF--
11
- Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d
12
- bool(false)
11
+ --EXPECT--
12
+ The given parameter is not a valid uuencoded string
Original file line number Diff line number Diff line change @@ -222,8 +222,8 @@ PHP_FUNCTION(convert_uudecode)
222
222
if (ZSTR_LEN (src ) < 1 ) { RETURN_FALSE ; }
223
223
224
224
if ((dest = php_uudecode (ZSTR_VAL (src ), ZSTR_LEN (src ))) == NULL ) {
225
- php_error_docref ( NULL , E_WARNING , "The given parameter is not a valid uuencoded string" );
226
- RETURN_FALSE ;
225
+ zend_value_error ( "The given parameter is not a valid uuencoded string" );
226
+ return ;
227
227
}
228
228
229
229
RETURN_STR (dest );
You can’t perform that action at this time.
0 commit comments