diff options
author | Sverker Eriksson <[email protected]> | 2018-06-28 14:59:33 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2018-06-28 15:27:12 +0200 |
commit | 1bd95380064dd4cce15eb3a900640ee6e7f2b2d2 (patch) | |
tree | 8418ea7129f1edcd03bd0f77f5f378c79472dfa3 | |
parent | f2c1d537dc28ffbde5d42aedec70bf4c6574c3ea (diff) | |
download | otp-1bd95380064dd4cce15eb3a900640ee6e7f2b2d2.tar.gz otp-1bd95380064dd4cce15eb3a900640ee6e7f2b2d2.tar.bz2 otp-1bd95380064dd4cce15eb3a900640ee6e7f2b2d2.zip |
ic: Fix buffer overrun bug in oe_ei_encode_atom
bug exists since OTP-20.3.4
1d3acb70debd134c8346b7e98347171d5cf6fc62
-rw-r--r-- | lib/ic/c_src/oe_ei_encode_atom.c | 2 |
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); |