]> err.no Git - linux-2.6/commitdiff
[PATCH] Fix typo in drivers/isdn/hisax/q931.c
authorEric Sesterhenn <snakebyte@gmx.de>
Mon, 26 Jun 2006 07:25:32 +0000 (00:25 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 26 Jun 2006 16:58:23 +0000 (09:58 -0700)
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.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/isdn/hisax/q931.c

index abecabf8c271326d201dc2b3e1c78bcd369af6fd..aacbf0d14b64acd0254b95bf0592461c19ee086d 100644 (file)
@@ -1402,12 +1402,12 @@ dlogframe(struct IsdnCardState *cs, struct sk_buff *skb, int dir)
                        }
                        /* 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