Skip to content
Snippets Groups Projects
Commit 2d81f77b authored by Stephen R. van den Berg's avatar Stephen R. van den Berg
Browse files

pgsql: Do not pass along strings with NUL characters in UTF-8.

parent a7a8eca2
No related branches found
No related tags found
No related merge requests found
......@@ -1195,6 +1195,10 @@ class sql_result {
value = (string)value;
switch (cenc) {
case UTF8CHARSET:
if (has_value(value, 0))
SUSERERROR("NUL characters not allowed in PG-UTF-8: %O\n",
value);
else
value = string_to_utf8(value);
break;
default:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment