Commit 8e6ab9f8 authored by Michael Meskes's avatar Michael Meskes

Properly end string to make sure ecpglib does not read beyond its boundaries.

parent e81f0e31
......@@ -1072,8 +1072,9 @@ print_param_value(char *value, int len, int is_binary, int lineno, int nth)
value_s = value;
else
{
value_s = ecpg_alloc(ecpg_hex_enc_len(len), lineno);
value_s = ecpg_alloc(ecpg_hex_enc_len(len)+1, lineno);
ecpg_hex_encode(value, len, value_s);
value_s[ecpg_hex_enc_len(len)] = '\0';
malloced = true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment