diff options
author | Sverker Eriksson <[email protected]> | 2015-04-22 14:54:00 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2015-04-22 14:54:00 +0200 |
commit | b3ad09ba107de16259844fe5bc50898ae40a1a96 (patch) | |
tree | 8f89f5510ab3e549c6b029420a0aa502c2415878 /erts/emulator/beam/io.c | |
parent | 67acde7a3522c651982a6789c749aaf73313e913 (diff) | |
parent | dd9ad8da73e15e89c8ab27efdd47a8bda8019957 (diff) | |
download | otp-b3ad09ba107de16259844fe5bc50898ae40a1a96.tar.gz otp-b3ad09ba107de16259844fe5bc50898ae40a1a96.tar.bz2 otp-b3ad09ba107de16259844fe5bc50898ae40a1a96.zip |
Merge branch 'sverk/pr632/prevent-illegal-nif-terms/OTP-12655'
* sverk/pr632/prevent-illegal-nif-terms/OTP-12655:
erts: Reject non-finite float terms in erl_drv_output_term
erts: Remove old docs about experimental NIF versions.
erts: Add enif_has_pending_exception
erts: Clearify erl_nif documentation about badarg exception
erts: Fix compile warning in enif_make_double
erts: Fix divide by zero compile error in nif_SUITE.c
erts: Fix isfinite for windows
Ensure NIF term creation disallows illegal values
Diffstat (limited to 'erts/emulator/beam/io.c')
-rw-r--r-- | erts/emulator/beam/io.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c index 8cb185cb2b..dec92be40a 100644 --- a/erts/emulator/beam/io.c +++ b/erts/emulator/beam/io.c @@ -5559,7 +5559,9 @@ driver_deliver_term(Eterm to, ErlDrvTermData* data, int len) mess = make_float(hp); f.fd = *((double *) ptr[0]); - PUT_DOUBLE(f, hp); + if (!erts_isfinite(f.fd)) + ERTS_DDT_FAIL; + PUT_DOUBLE(f, hp); hp += FLOAT_SIZE_OBJECT; ptr++; break; |