diff options
author | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2011-08-18 14:19:00 +0530 |
---|---|---|
committer | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2011-08-18 14:19:00 +0530 |
commit | 9083a8f667cc124a7d3c7dcf40a38a9c273856b3 (patch) | |
tree | 36e3f66f8e2a3937cb958a8cb7b4203f066b8e9c | |
parent | 2568542b1839ff7ee02fbe7d766bf8ee0eb88d09 (diff) |
sample-util: Fix off-by-one in error check
Patch by jk.illwinter on http://www.pulseaudio.org/ticket/951
-rw-r--r-- | src/pulsecore/sample-util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pulsecore/sample-util.c b/src/pulsecore/sample-util.c index 16ec4ad2..a9e486e3 100644 --- a/src/pulsecore/sample-util.c +++ b/src/pulsecore/sample-util.c @@ -748,8 +748,8 @@ void pa_volume_memchunk( return; } - if (spec->format < 0 || spec->format > PA_SAMPLE_MAX) { - pa_log_warn(" Unable to change volume of format %s.", pa_sample_format_to_string(spec->format)); + if (spec->format < 0 || spec->format >= PA_SAMPLE_MAX) { + pa_log_warn("Unable to change volume of format"); return; } |