aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2018-06-28 17:08:56 +0200
committerErlang/OTP <[email protected]>2018-06-28 17:08:56 +0200
commit01a63de3f90fe835147ccedbba5606c15479dfaa (patch)
treefc8040b4668baa5f0725ff3df5c41f7017f8ef09
parent0f59518fcbaf1d6ea0d7f9df243c48937f0d06af (diff)
parent1bd95380064dd4cce15eb3a900640ee6e7f2b2d2 (diff)
downloadotp-01a63de3f90fe835147ccedbba5606c15479dfaa.tar.gz
otp-01a63de3f90fe835147ccedbba5606c15479dfaa.tar.bz2
otp-01a63de3f90fe835147ccedbba5606c15479dfaa.zip
Merge branch 'sverker/ic/encode-atom-overrun/ERIERL-191/OTP-15160' into maint-20
* sverker/ic/encode-atom-overrun/ERIERL-191/OTP-15160: ic: Fix buffer overrun bug in oe_ei_encode_atom
-rw-r--r--lib/ic/c_src/oe_ei_encode_atom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ic/c_src/oe_ei_encode_atom.c b/lib/ic/c_src/oe_ei_encode_atom.c
index 99a9fe26f0..9d2c1d5aa3 100644
--- a/lib/ic/c_src/oe_ei_encode_atom.c
+++ b/lib/ic/c_src/oe_ei_encode_atom.c
@@ -30,7 +30,7 @@ int oe_ei_encode_atom(CORBA_Environment *ev, const char *p) {
int size = ev->_iout;
size_t len = strlen(p);
- if (DIRTY_ATOM_ENC_MAX(len) >= ev->_outbufsz) {
+ if (size + DIRTY_ATOM_ENC_MAX(len) >= ev->_outbufsz) {
ei_encode_atom_len(0,&size,p,len);