projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50c1374
)
Use correct length to convert json unicode escapes.
author
Andrew Dunstan
<andrew@dunslane.net>
Wed, 1 May 2013 22:47:18 +0000
(18:47 -0400)
committer
Andrew Dunstan
<andrew@dunslane.net>
Wed, 1 May 2013 22:47:18 +0000
(18:47 -0400)
Bug reported on IRC - fix due to Andrew Gierth.
src/backend/utils/adt/json.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/utils/adt/json.c
b/src/backend/utils/adt/json.c
index 90404f34effd1988ac66a186a8d8a09b8d1ae1bc..507c91ff97b2fd30269c1d4a450e7b72e2cf0e07 100644
(file)
--- a/
src/backend/utils/adt/json.c
+++ b/
src/backend/utils/adt/json.c
@@
-721,7
+721,7
@@
json_lex_string(JsonLexContext *lex)
unicode_to_utf8(ch, (unsigned char *) utf8str);
utf8len = pg_utf_mblen((unsigned char *) utf8str);
utf8str[utf8len] = '\0';
- converted = pg_any_to_server(utf8str,
1
, PG_UTF8);
+ converted = pg_any_to_server(utf8str,
utf8len
, PG_UTF8);
appendStringInfoString(lex->strval, converted);
if (converted != utf8str)
pfree(converted);