aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2015-04-15 17:30:00 +0200
committerSverker Eriksson <[email protected]>2015-04-15 19:02:13 +0200
commitdd9ad8da73e15e89c8ab27efdd47a8bda8019957 (patch)
tree5a51b32e20bb5fd9ed18bd845ffa767e643a3396
parent308b03e8afa14e03973330942e7aacf0cc925bf2 (diff)
downloadotp-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.c4
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;