Skip to content

Commit 5f8b431

Browse files
committed
Use correct length to convert json unicode escapes.
Bug reported on IRC - fix due to Andrew Gierth.
1 parent 50c1374 commit 5f8b431

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/utils/adt/json.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ json_lex_string(JsonLexContext *lex)
721721
unicode_to_utf8(ch, (unsigned char *) utf8str);
722722
utf8len = pg_utf_mblen((unsigned char *) utf8str);
723723
utf8str[utf8len] = '\0';
724-
converted = pg_any_to_server(utf8str, 1, PG_UTF8);
724+
converted = pg_any_to_server(utf8str, utf8len, PG_UTF8);
725725
appendStringInfoString(lex->strval, converted);
726726
if (converted != utf8str)
727727
pfree(converted);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy