netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gigaset: beyond ARRAY_SIZE of iwb->data
@ 2009-05-21 20:32 Roel Kluin
  2009-05-21 22:04 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Roel Kluin @ 2009-05-21 20:32 UTC (permalink / raw)
  To: hjlipp; +Cc: gigaset307x-common, netdev, Andrew Morton

Do not go beyond ARRAY_SIZE of iwb->data

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
Sorry for the dup, the header was incorrect. This is against linux-next.

diff --git a/drivers/isdn/gigaset/isocdata.c b/drivers/isdn/gigaset/isocdata.c
index fbce522..5569a6e 100644
--- a/drivers/isdn/gigaset/isocdata.c
+++ b/drivers/isdn/gigaset/isocdata.c
@@ -177,7 +177,7 @@ int gigaset_isowbuf_getbytes(struct isowbuf_t *iwb, int size)
 		return -EINVAL;
 	}
 	src = iwb->read;
-	if (unlikely(limit > BAS_OUTBUFSIZE + BAS_OUTBUFPAD ||
+	if (unlikely(limit >= BAS_OUTBUFSIZE + BAS_OUTBUFPAD ||
 		     (read < src && limit >= src))) {
 		err("isoc write buffer frame reservation violated");
 		return -EFAULT;



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

end of thread, other threads:[~2009-05-25 10:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-21 20:32 [PATCH] gigaset: beyond ARRAY_SIZE of iwb->data Roel Kluin
2009-05-21 22:04 ` David Miller
2009-05-25 10:00   ` Tilman Schmidt

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).