summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorEdward Hervey <edward@collabora.com>2013-12-10 17:09:07 -0500
committerEdward Hervey <edward@collabora.com>2013-12-10 17:09:07 -0500
commitb363ab17e7a34fb1040481b9aadabf2ad6c93901 (patch)
tree998a9c198b4069165b984d6e8612070baba8d278 /libs
parent9a62f007fc21bf4eddcdffa8b2b1ab242d7ff6a0 (diff)
downloadgstreamer-b363ab17e7a34fb1040481b9aadabf2ad6c93901.tar.gz
controller: Fix out-of-bounds detection
We want to abort if we higher than the maximum *OR* lower than the minimum accepted value. Detected by Coverity.
Diffstat (limited to 'libs')
-rw-r--r--libs/gst/controller/gstinterpolationcontrolsource.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/gst/controller/gstinterpolationcontrolsource.c b/libs/gst/controller/gstinterpolationcontrolsource.c
index 0aea6cd841..b8a3c223c8 100644
--- a/libs/gst/controller/gstinterpolationcontrolsource.c
+++ b/libs/gst/controller/gstinterpolationcontrolsource.c
@@ -524,7 +524,7 @@ static gboolean
{
GstControlSource *csource = GST_CONTROL_SOURCE (self);
- if (mode >= num_interpolation_modes && (int) mode < 0) {
+ if (mode >= num_interpolation_modes || (int) mode < 0) {
GST_WARNING ("interpolation mode %d invalid or not implemented yet", mode);
return FALSE;
}