diff options
author | Henrik Nord <[email protected]> | 2015-03-12 12:09:11 +0100 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2015-03-12 12:09:14 +0100 |
commit | 79739d9567f72e7fe725509912ec676ea955ab64 (patch) | |
tree | 6cf5bf6c4efbbf2b641f83a5e64e7f26dbe3885c /erts/emulator/beam/big.c | |
parent | 0796cb716511ae2bf35ee0ee1e0da75f20ad567f (diff) | |
parent | 7f82fdee75c2c3c3c5eaf259e2671737163be32b (diff) | |
download | otp-79739d9567f72e7fe725509912ec676ea955ab64.tar.gz otp-79739d9567f72e7fe725509912ec676ea955ab64.tar.bz2 otp-79739d9567f72e7fe725509912ec676ea955ab64.zip |
Merge branch 'mikpe/avoid-oversize-bignums' into maint
* mikpe/avoid-oversize-bignums:
don't leave a heap hole in erts_bs_get_integer_2
don't create oversize bignums in binary matching
OTP-12556
Diffstat (limited to 'erts/emulator/beam/big.c')
-rw-r--r-- | erts/emulator/beam/big.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/erts/emulator/beam/big.c b/erts/emulator/beam/big.c index de7d370938..d1e46e3063 100644 --- a/erts/emulator/beam/big.c +++ b/erts/emulator/beam/big.c @@ -1900,6 +1900,8 @@ Eterm bytes_to_big(byte *xp, dsize_t xsz, int xsgn, Eterm *r) *rwp = d; rwp++; } + if (rsz > BIG_ARITY_MAX) + return NIL; if (xsgn) { *r = make_neg_bignum_header(rsz); } |