aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-06-28 14:59:33 +0200
committerSverker Eriksson <[email protected]>2018-06-28 15:27:12 +0200
commit1bd95380064dd4cce15eb3a900640ee6e7f2b2d2 (patch)
tree8418ea7129f1edcd03bd0f77f5f378c79472dfa3 /lib
parentf2c1d537dc28ffbde5d42aedec70bf4c6574c3ea (diff)
downloadotp-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
Diffstat (limited to 'lib')
-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);