kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] [media] av7110: make array offset unsigned
@ 2011-01-06 19:41 Dan Carpenter
  2011-01-07 12:44 ` Andreas Oberritter
  0 siblings, 1 reply; 11+ messages in thread
From: Dan Carpenter @ 2011-01-06 19:41 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-media, kernel-janitors

In the CA_GET_SLOT_INFO ioctl, we only check whether "num" is too large,
but we don't check if it's negative.

drivers/media/dvb/ttpci/av7110_ca.c
   278		ca_slot_info_t *info=(ca_slot_info_t *)parg;
   279
   280		if (info->num > 1)
   281			return -EINVAL;
   282		av7110->ci_slot[info->num].num = info->num;

Let's just make it unsigned.

Signed-off-by: Dan Carpenter <error27@gmail.com>
---
Compile tested.

diff --git a/include/linux/dvb/ca.h b/include/linux/dvb/ca.h
index c18537f..647015e 100644
--- a/include/linux/dvb/ca.h
+++ b/include/linux/dvb/ca.h
@@ -27,7 +27,7 @@
 /* slot interface types and info */
 
 typedef struct ca_slot_info {
-	int num;               /* slot number */
+	unsigned int num;      /* slot number */
 
 	int type;              /* CA interface this slot supports */
 #define CA_CI            1     /* CI high level interface */

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-01-12 15:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-06 19:41 [patch] [media] av7110: make array offset unsigned Dan Carpenter
2011-01-07 12:44 ` Andreas Oberritter
2011-01-07 13:46   ` [patch v2] [media] av7110: check for negative array offset Dan Carpenter
2011-01-07 19:01     ` Oliver Endriss
2011-01-07 19:41       ` [patch v3] " Dan Carpenter
2011-01-12 12:44         ` walter harms
2011-01-12 13:30         ` Jorge Merlino
2011-01-12 15:49         ` walter harms
2011-01-07 13:51   ` [patch] [media] av7110: make array offset unsigned Dan Carpenter
2011-01-07 14:02     ` Vasiliy Kulikov
2011-01-07 14:05     ` Andreas Oberritter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).