Two different value errors occur in the below code as the result of unhandled exceptions in the _walk_ast function of lib.py. These unhanded exceptions cause an abrupt exit of the program rather than being handled or providing a more descriptive message. If this is not something of interest I can understand that, but I wanted to bring this to attention.
import json5
import io
data = io.BytesIO(b"--6.0")
loadval1 = json5.load(data)
The above program causes this trace:
Traceback (most recent call last):
File "rep.py", line 5, in <module>
loadval1 = json5.load(fuzzData)
File "venv/lib/python3.10/site-packages/json5/lib.py", line 99, in load
return loads(
File "venv/lib/python3.10/site-packages/json5/lib.py", line 174, in loads
return _walk_ast(ast, dictify, parse_float, parse_int, parse_constant)
File "venv/lib/python3.10/site-packages/json5/lib.py", line 204, in _walk_ast
return parse_float(v)
ValueError: could not convert string to float: '--6.0'
import json5
import io
data = io.BytesIO(b"--6")
loadval1 = json5.load(data)
While the above program causes this other trace:
Traceback (most recent call last):
File "rep.py", line 5, in <module>
loadval1 = json5.load(fuzzData)
File "venv/lib/python3.10/site-packages/json5/lib.py", line 99, in load
return loads(
File "venv/lib/python3.10/site-packages/json5/lib.py", line 174, in loads
return _walk_ast(ast, dictify, parse_float, parse_int, parse_constant)
File "venv/lib/python3.10/site-packages/json5/lib.py", line 207, in _walk_ast
return parse_int(v)
ValueError: invalid literal for int() with base 10: '--6'
Commit: d103b62
Two different value errors occur in the below code as the result of unhandled exceptions in the _walk_ast function of lib.py. These unhanded exceptions cause an abrupt exit of the program rather than being handled or providing a more descriptive message. If this is not something of interest I can understand that, but I wanted to bring this to attention.
The above program causes this trace:
While the above program causes this other trace:
Commit: d103b62