ion-c icon indicating copy to clipboard operation
ion-c copied to clipboard

Ion Reader Fails with Assertion on Empty Buffer Read

Open almann opened this issue 4 years ago • 1 comments

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.

almann avatar Apr 18 '21 21:04 almann

See amzn/ion-rust#193 for the code that fixes the repro in that package for this bug.

almann avatar Apr 18 '21 21:04 almann