pgsql: Fix overread in JSON parsing errors for incomplete byte sequence

2024-05-08 Thread Michael Paquier
Fix overread in JSON parsing errors for incomplete byte sequences json_lex_string() relies on pg_encoding_mblen_bounded() to point to the end of a JSON string when generating an error message, and the input it uses is not guaranteed to be null-terminated. It was possible to walk off the end of th

pgsql: Fix overread in JSON parsing errors for incomplete byte sequence

2024-05-08 Thread Michael Paquier
Fix overread in JSON parsing errors for incomplete byte sequences json_lex_string() relies on pg_encoding_mblen_bounded() to point to the end of a JSON string when generating an error message, and the input it uses is not guaranteed to be null-terminated. It was possible to walk off the end of th

pgsql: Fix overread in JSON parsing errors for incomplete byte sequence

2024-05-08 Thread Michael Paquier
Fix overread in JSON parsing errors for incomplete byte sequences json_lex_string() relies on pg_encoding_mblen_bounded() to point to the end of a JSON string when generating an error message, and the input it uses is not guaranteed to be null-terminated. It was possible to walk off the end of th

pgsql: Fix overread in JSON parsing errors for incomplete byte sequence

2024-05-08 Thread Michael Paquier
Fix overread in JSON parsing errors for incomplete byte sequences json_lex_string() relies on pg_encoding_mblen_bounded() to point to the end of a JSON string when generating an error message, and the input it uses is not guaranteed to be null-terminated. It was possible to walk off the end of th

pgsql: Fix overread in JSON parsing errors for incomplete byte sequence

2024-05-08 Thread Michael Paquier
Fix overread in JSON parsing errors for incomplete byte sequences json_lex_string() relies on pg_encoding_mblen_bounded() to point to the end of a JSON string when generating an error message, and the input it uses is not guaranteed to be null-terminated. It was possible to walk off the end of th