Subject: [PATCH] gigaset: beyond ARRAY_SIZE of iwb->data

From: Roel Kluin <[email-masked]>
Date: Thu, 21 May 2009 22:32:54 +0200

Do not go beyond ARRAY_SIZE of iwb->data

Signed-off-by: Roel Kluin <[email-masked]>
---
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;