mirror of
https://github.com/postgres/postgres.git
synced 2026-07-15 20:52:53 -04:00
Properly end string to make sure ecpglib does not read beyond its boundaries.
This commit is contained in:
parent
e81f0e3113
commit
8e6ab9f801
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue