mangrove
mangrove copied to clipboard
Fix mangrove crash
Crash observed when document length is 257 byte, for example. It represents as '0x01 01 00 00'. In this case '_bytes_read == _len' equal to 1 and callback is called with partial buffer (only 1 byte actually). This cause later crash in 'to_dotted_notation_document'
Signed-off-by: Abylay Ospan [email protected]
Wow, good catch!
@rkargon tnx :)
BTW, better to implement: streamsize xsputn (const char* s, streamsize n);
then we shouldn't care about buffer assembly and avoid byte-by-byte copy (which can slow down whole process)