aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ic/c_src
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-07-11 18:27:54 +0200
committerSverker Eriksson <[email protected]>2018-07-11 20:41:39 +0200
commitcdfc10af65b613a5315add29a3b7a89c6b513883 (patch)
treeae209083205b19488f7adf3e34da33e9f98c836c /lib/ic/c_src
parent857156bcadae45fe112911bd7ca735ac6f3ca9d2 (diff)
downloadotp-cdfc10af65b613a5315add29a3b7a89c6b513883.tar.gz
otp-cdfc10af65b613a5315add29a3b7a89c6b513883.tar.bz2
otp-cdfc10af65b613a5315add29a3b7a89c6b513883.zip
ic: Fix correct external format sizes
longs, longlongs and wchar were too small on 64-bit which could lead to potential buffer overflow at encoding. __OE_DOUBLESZ__ was too big, probably due to old text format.
Diffstat (limited to 'lib/ic/c_src')
-rw-r--r--lib/ic/c_src/oe_ei_decode_wstring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ic/c_src/oe_ei_decode_wstring.c b/lib/ic/c_src/oe_ei_decode_wstring.c
index 5b676fd579..66eaf66392 100644
--- a/lib/ic/c_src/oe_ei_decode_wstring.c
+++ b/lib/ic/c_src/oe_ei_decode_wstring.c
@@ -76,7 +76,7 @@ int oe_ei_decode_wstring(const char *buf, int *index, CORBA_wchar *p) {
if (p) { /* Decoding part */
/* Allocate temporary string */
- tmp_space = (char*) malloc(length*(__OE_WCHARSZ__+1));
+ tmp_space = (char*) malloc((length + 1)*sizeof(char));
if ((error_code = ei_decode_string(buf, index, tmp_space)) < 0)
return error_code;