Skip to content

Commit 8e6ab9f

Browse files
author
Michael Meskes
committed
Properly end string to make sure ecpglib does not read beyond its boundaries.
1 parent e81f0e3 commit 8e6ab9f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/interfaces/ecpg/ecpglib/execute.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1072,8 +1072,9 @@ print_param_value(char *value, int len, int is_binary, int lineno, int nth)
10721072
value_s = value;
10731073
else
10741074
{
1075-
value_s = ecpg_alloc(ecpg_hex_enc_len(len), lineno);
1075+
value_s = ecpg_alloc(ecpg_hex_enc_len(len)+1, lineno);
10761076
ecpg_hex_encode(value, len, value_s);
1077+
value_s[ecpg_hex_enc_len(len)] = '\0';
10771078
malloced = true;
10781079
}
10791080

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy