diff options
author | Edward Hervey <edward@collabora.com> | 2013-12-10 17:09:07 -0500 |
---|---|---|
committer | Edward Hervey <edward@collabora.com> | 2013-12-10 17:09:07 -0500 |
commit | b363ab17e7a34fb1040481b9aadabf2ad6c93901 (patch) | |
tree | 998a9c198b4069165b984d6e8612070baba8d278 /libs | |
parent | 9a62f007fc21bf4eddcdffa8b2b1ab242d7ff6a0 (diff) | |
download | gstreamer-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.c | 2 |
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; } |