aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/external.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2012-02-23 14:45:42 +0100
committerSverker Eriksson <[email protected]>2012-02-23 14:45:42 +0100
commit225da20b097ad73291cf48ba2782c64762163a46 (patch)
treef6901cf50f16eb19a0617be068bec613077823a2 /erts/emulator/beam/external.c
parentbbd8182e4b4ed116743f81ff456b53b86b1bea8f (diff)
parent3398aa592af611b84edad4fa56e88379df6d1735 (diff)
downloadotp-225da20b097ad73291cf48ba2782c64762163a46.tar.gz
otp-225da20b097ad73291cf48ba2782c64762163a46.tar.bz2
otp-225da20b097ad73291cf48ba2782c64762163a46.zip
Merge branch 'maint'
Diffstat (limited to 'erts/emulator/beam/external.c')
-rw-r--r--erts/emulator/beam/external.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/erts/emulator/beam/external.c b/erts/emulator/beam/external.c
index 152dbcf085..9d52ed4e98 100644
--- a/erts/emulator/beam/external.c
+++ b/erts/emulator/beam/external.c
@@ -3118,6 +3118,9 @@ decoded_size(byte *ep, byte* endp, int internal_tags)
case LARGE_BIG_EXT:
CHKSIZE(4);
n = get_int32(ep);
+ if (n > BIG_ARITY_MAX*sizeof(ErtsDigit)) {
+ return -1;
+ }
SKIP2(n,4+1); /* skip, size,sign,digits */
heap_size += 1+1+(n+sizeof(Eterm)-1)/sizeof(Eterm); /* XXX: 1 too much? */
break;