Skip to contentSkip to conversation

X:beyond ARRAY_SIZE of iwb->data

PATCH New Roel Kluin 1 participant 1 message May 21, 2009

Subsystems (2)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 X:beyond ARRAY_SIZE of iwb->data

Do not go beyond ARRAY_SIZE of iwb->data

---

drivers/isdn/gigaset/isocdata.c +1 -1
index fbce522..5569a6e 100644
@@ -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;