projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
| inline |
side by side
(parent:
e81f0e3
)
Properly end string to make sure ecpglib does not read beyond its boundaries.
author
Michael Meskes
<
[email protected]
>
Mon, 18 Feb 2019 11:52:53 +0000
(12:52 +0100)
committer
Michael Meskes
<
[email protected]
>
Mon, 18 Feb 2019 11:52:53 +0000
(12:52 +0100)
src/interfaces/ecpg/ecpglib/execute.c
|
blob
|
blame
|
history
diff --git
a/src/interfaces/ecpg/ecpglib/execute.c
b/src/interfaces/ecpg/ecpglib/execute.c
index 67681956b095a71eb1e27253c09cf27ebdf39b6b..0c147b77cc92d836b48461ff1d4530d8dd327ab0 100644
(file)
--- a/
src/interfaces/ecpg/ecpglib/execute.c
+++ b/
src/interfaces/ecpg/ecpglib/execute.c
@@
-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;
}