Re: [PATCH] json_lex_string: don't overread on bad UTF8
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: Jacob Champion <jacob.champion@enterprisedb.com>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Cc: Andrew Dunstan <andrew@dunslane.net>
Date: 2024-05-03T11:54:11Z
Lists: pgsql-hackers
On 30.04.24 19:39, Jacob Champion wrote: > Tangentially: Should we maybe rethink pieces of the json_lex_string > error handling? For example, do we really want to echo an incomplete > multibyte sequence once we know it's bad? I can't quite find the place you might be looking at in json_lex_string(), but for the general encoding conversion we have what would appear to be the same behavior in report_invalid_encoding(), and we go out of our way there to produce a verbose error message including the invalid data.
Commits
-
Fix overread in JSON parsing errors for incomplete byte sequences
- 377c25d32275 13.16 landed
- 41adf9d960c0 14.13 landed
- 8c3f30e675e9 15.8 landed
- 5396a2987cc6 16.4 landed
- 855517307db8 17.0 landed