When calling ujson.dumps() with large indent value, the program crashes with a segmentation fault.
Program:
import ujson
obj = {'list': [1, 2, 3], 'nested': {'key': 'value'}}
result = ujson.dumps(obj, indent=2000000000)
ujson version: 5.11.0
Actual Behavior: Program crashes with segmentation fault
Expected Behavior: The function should handle these indent values. If it's invalid, it could raise a ValueError or OverflowError ?
When calling
ujson.dumps()with largeindentvalue, the program crashes with a segmentation fault.Program:
ujson version: 5.11.0
Actual Behavior: Program crashes with
segmentation faultExpected Behavior: The function should handle these indent values. If it's invalid, it could raise a
ValueErrororOverflowError?