ion-c
ion-c copied to clipboard
Ion Reader Fails with Assertion on Empty Buffer Read
Attempting to read a clob or blob with a zero byte buffer fails with assertion:
ionc/ion_reader.c:1747: _ion_reader_read_lob_bytes_helper: Assertion `buf_max' failed.
This should not happen especially if caller code is primed to invoke this method based on the length--we can argue if the client code is not being smart about this case but the routine terminating the process for this case is definitely not correct.
See amzn/ion-rust#193 for the code that fixes the repro in that package for this bug.