This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/v4l-utils.git tree:

Subject: libdvbv5: Stricter input validation
Author:  Gregor Jasny <[email protected]>
Date:    Sun Jun 24 17:58:23 2012 +0200

Signed-off-by: Gregor Jasny <[email protected]>

 lib/libdvbv5/dvb-fe.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

---

http://git.linuxtv.org/v4l-utils.git?a=commitdiff;h=f890383b88f8e643e369167062e33da2bd871064

diff --git a/lib/libdvbv5/dvb-fe.c b/lib/libdvbv5/dvb-fe.c
index cc3d49d..764b600 100644
--- a/lib/libdvbv5/dvb-fe.c
+++ b/lib/libdvbv5/dvb-fe.c
@@ -443,18 +443,18 @@ int dvb_set_compat_delivery_system(struct dvb_v5_fe_parms 
*parms,
 
 const char *dvb_cmd_name(int cmd)
 {
-       if (cmd < DTV_USER_COMMAND_START)
+       if (cmd >= 0 && cmd < DTV_USER_COMMAND_START)
                return dvb_v5_name[cmd];
-       else if (cmd <= DTV_MAX_USER_COMMAND)
+       else if (cmd >= 0 && cmd <= DTV_MAX_USER_COMMAND)
                return dvb_user_name[cmd - DTV_USER_COMMAND_START];
        return NULL;
 }
 
 const char * const *dvb_attr_names(int cmd)
 {
-       if (cmd < DTV_USER_COMMAND_START)
+       if (cmd >= 0 && cmd < DTV_USER_COMMAND_START)
                return dvb_v5_attr_names[cmd];
-       else if (cmd <= DTV_MAX_USER_COMMAND)
+       else if (cmd >= 0 && cmd <= DTV_MAX_USER_COMMAND)
                return dvb_user_attr_names[cmd - DTV_USER_COMMAND_START];
        return NULL;
 }

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to