Skip to contentSkip to conversation

Fix typo in drivers/isdn/hisax/q931.c

PATCH New Eric Sesterhenn 1 participant 1 message Jun 5, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix typo in drivers/isdn/hisax/q931.c

hi,

this fixes coverity bug #517.
Since IESIZE is greater than IESIZE_NI1 we might run past the end of ielist_ni1. This fixes it by using the proper IESIZE_NI1 define.

drivers/isdn/hisax/q931.c renamed from drivers/isdn/hisax/q931.c.orig +2 -2
@@ -1402,12 +1402,12 @@ dlogframe(struct IsdnCardState *cs, stru
 			}
 			/* No, locate it in the table */
 			if (cset == 0) {
-				for (i = 0; i < IESIZE; i++)
+				for (i = 0; i < IESIZE_NI1; i++)
 					if (*buf == ielist_ni1[i].nr)
 						break;
 
 				/* When not found, give appropriate msg */
-				if (i != IESIZE) {
+				if (i != IESIZE_NI1) {
 					dp += sprintf(dp, "  %s\n", ielist_ni1[i].descr);
 					dp += ielist_ni1[i].f(dp, buf);
 				} else