mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-22 09:30:45 +00:00
rjson::parse() when parsing JSON stored in a chunked_content (a vector of temporary buffers) failed to initialize its byte counter to 0, resulting in garbage positions in error messages like: Parsing JSON failed: Missing a name for object member. at 1452254 These error messages were most noticable in Alternator, which parses JSON requests using a chunked_content, and reports these errors back to the user. The fix is trivial: add the missing initialization of the counter. The patch also adds a regression test for this bug - it sends a JSON corrupt at position 1, and expect to see "at 1" and not some large random number. Fixes #27372 Signed-off-by: Nadav Har'El <nyh@scylladb.com>
23 KiB
23 KiB