* [PATCH] X:beyond ARRAY_SIZE of iwb->data
@ 2009-05-21 20:05 Roel Kluin
0 siblings, 0 replies; only message in thread
From: Roel Kluin @ 2009-05-21 20:05 UTC (permalink / raw)
To: hjlipp; +Cc: gigaset307x-common, netdev
Do not go beyond ARRAY_SIZE of iwb->data
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
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] only message in thread
only message in thread, other threads:[~2009-05-21 20:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-21 20:05 [PATCH] X:beyond ARRAY_SIZE of iwb->data Roel Kluin
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).