diff options
author | Sverker Eriksson <[email protected]> | 2015-04-15 17:30:00 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2015-04-15 19:02:13 +0200 |
commit | dd9ad8da73e15e89c8ab27efdd47a8bda8019957 (patch) | |
tree | 5a51b32e20bb5fd9ed18bd845ffa767e643a3396 | |
parent | 308b03e8afa14e03973330942e7aacf0cc925bf2 (diff) | |
download | otp-dd9ad8da73e15e89c8ab27efdd47a8bda8019957.tar.gz otp-dd9ad8da73e15e89c8ab27efdd47a8bda8019957.tar.bz2 otp-dd9ad8da73e15e89c8ab27efdd47a8bda8019957.zip |
erts: Reject non-finite float terms in erl_drv_output_term
-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 012a7d1a4b..07dc0db3b9 100644 --- a/erts/emulator/beam/io.c +++ b/erts/emulator/beam/io.c @@ -5581,7 +5581,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; |