From 3da7ecfadfb3e73438e65a64937163320bbbe807 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 20 Feb 2019 19:27:13 +0100 Subject: [PATCH] mixer/pulse: add missing ParseFloat() check --- src/mixer/plugins/PulseMixerPlugin.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mixer/plugins/PulseMixerPlugin.cxx b/src/mixer/plugins/PulseMixerPlugin.cxx index ed2afbcf5..44fcb56f7 100644 --- a/src/mixer/plugins/PulseMixerPlugin.cxx +++ b/src/mixer/plugins/PulseMixerPlugin.cxx @@ -175,7 +175,7 @@ parse_volume_scale_factor(const char *value) { char *endptr; float factor = ParseFloat(value, &endptr); - if (*endptr != '\0' || factor < 0.5 || factor > 5.0) + if (endptr == value || *endptr != '\0' || factor < 0.5 || factor > 5.0) throw FormatRuntimeError("\"%s\" is not a number in the " "range 0.5 to 5.0", value);