aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/dbl-64/s_getpayload.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/dbl-64/s_getpayload.c')
-rw-r--r--sysdeps/ieee754/dbl-64/s_getpayload.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/ieee754/dbl-64/s_getpayload.c b/sysdeps/ieee754/dbl-64/s_getpayload.c
index 3ab89ddd66..5a055be35a 100644
--- a/sysdeps/ieee754/dbl-64/s_getpayload.c
+++ b/sysdeps/ieee754/dbl-64/s_getpayload.c
@@ -27,6 +27,9 @@ __getpayload (const double *x)
{
uint32_t hx, lx;
EXTRACT_WORDS (hx, lx, *x);
+ if ((hx & 0x7ff00000) != 0x7ff00000
+ || ((hx & 0xfffff) | lx) == 0)
+ return -1;
hx &= 0x7ffff;
uint64_t ix = ((uint64_t) hx << 32) | lx;
if (FIX_INT_FP_CONVERT_ZERO && ix == 0)