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/beam_load.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/beam_load.c')
-rw-r--r-- | erts/emulator/beam/beam_load.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c index cfc6146b0a..41c1b5d2c2 100644 --- a/erts/emulator/beam/beam_load.c +++ b/erts/emulator/beam/beam_load.c @@ -4971,7 +4971,8 @@ get_tag_and_value(LoaderState* stp, Uint len_code, arity = count/sizeof(Eterm); *result = new_literal(stp, &hp, arity+1); - (void) bytes_to_big(bigbuf, count, neg, hp); + if (is_nil(bytes_to_big(bigbuf, count, neg, hp))) + goto load_error; if (bigbuf != default_buf) { erts_free(ERTS_ALC_T_LOADER_TMP, (void *) bigbuf); |