diff options
author | Sverker Eriksson <[email protected]> | 2016-09-06 14:51:18 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-09-06 14:51:18 +0200 |
commit | 08ff462b9302f62aafa20c1978d5ca148f03cdd3 (patch) | |
tree | 2078f28ad1ad783e4269b2256b5f5482306d64c5 /erts | |
parent | 6a79c1e1d020570d41f825a1ee5d8dd8d9546bc8 (diff) | |
parent | 02565089e3747a0f85125647b8ad2467e4c2b36d (diff) | |
download | otp-08ff462b9302f62aafa20c1978d5ca148f03cdd3.tar.gz otp-08ff462b9302f62aafa20c1978d5ca148f03cdd3.tar.bz2 otp-08ff462b9302f62aafa20c1978d5ca148f03cdd3.zip |
Merge branch 'sverker/beam-too-few-functions/ERL-244/OTP-13848' into maint
* sverker/beam-too-few-functions/ERL-244:
erts: Reject beam file with too few functions
Diffstat (limited to 'erts')
-rw-r--r-- | erts/emulator/beam/beam_load.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c index b7e802775d..f63addb309 100644 --- a/erts/emulator/beam/beam_load.c +++ b/erts/emulator/beam/beam_load.c @@ -2635,6 +2635,10 @@ load_code(LoaderState* stp) * End of code found. */ case op_int_code_end: + if (function_number != stp->num_functions) { + LoadError2(stp, "too few functions (%u) in module (header said %u)", + function_number, stp->num_functions); + } stp->codev_size = codev_size; stp->ci = ci; stp->function = THE_NON_VALUE; |