Closed
Description
Describe the bug
The WASM write
function is called with null pointer via the JS wrapper, which causes a panic when compiled in debug mode and UB in release mode.
Lines 674 to 675 in e4ea343
Lines 48 to 49 in e4ea343
To Reproduce
- Compile with a recent stable compiler without
--release
. - Call
SAXParser.write
. - WASM crashes with
unreachable
instruction.
Expected behavior
The Rust code does not construct a null slice.
Desktop (please complete the following information):
- OS: Linux
- Browser: Firefox 135, Chromium 133.0.6943.98
Additional context
I am trying to use this library to parse XML files that are nearly 1gb, and running into an infinite loop. I found this while trying to debug that.