diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c index 1dad507a4..452630654 100644 --- a/src/pulsecore/core-util.c +++ b/src/pulsecore/core-util.c @@ -23,6 +23,7 @@ #include #endif +#include #include #include #include @@ -2448,6 +2449,11 @@ int pa_atod(const char *s, double *ret_d) { return -1; } + if (isnan(f)) { + errno = EINVAL; + return -1; + } + *ret_d = f; return 0;