[vlc-devel] commit: This changes range validation for control values from ( Brian Johnson )

git version control git at videolan.org
Sun Mar 22 16:18:06 CET 2009


vlc | branch: master | Brian Johnson <brijohn at gmail.com> | Fri Mar 20 15:05:01 2009 -0400| [2f1485c117871012ede43e5cd49d9e1b15f5d6b2] | committer: Laurent Aimar 

This changes range validation for control values from
value >= 0 to value >= minimum && value <= maximum

Signed-off-by: Brian Johnson <brijohn at gmail.com>
Signed-off-by: Laurent Aimar <fenrir at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2f1485c117871012ede43e5cd49d9e1b15f5d6b2
---

 modules/access/v4l2.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/access/v4l2.c b/modules/access/v4l2.c
index f1f4990..38abc61 100644
--- a/modules/access/v4l2.c
+++ b/modules/access/v4l2.c
@@ -2932,7 +2932,7 @@ static int Control( vlc_object_t *p_obj, int i_fd,
 
     int i_ret = -1;
 
-    if( i_value >= 0 )
+    if( i_value >= queryctrl.minimum && i_value <= queryctrl.maximum )
     {
         ext_control.value = i_value;
         if( v4l2_ioctl( i_fd, VIDIOC_S_EXT_CTRLS, &ext_controls ) < 0 )




More information about the vlc-devel mailing list