public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sesterhenn <snakebyte@gmx.de>
To: linux-kernel@vger.kernel.org
Cc: isdn4linux@listserv.isdn4linux.de
Subject: [Patch] Fix typo in drivers/isdn/hisax/q931.c
Date: Mon, 05 Jun 2006 21:06:14 +0200	[thread overview]
Message-ID: <1149534374.16598.2.camel@alice> (raw)

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.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> 

--- linux-2.6.17-rc5/drivers/isdn/hisax/q931.c.orig	2006-06-05 20:57:11.000000000 +0200
+++ linux-2.6.17-rc5/drivers/isdn/hisax/q931.c	2006-06-05 20:57:50.000000000 +0200
@@ -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



                 reply	other threads:[~2006-06-05 19:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1149534374.16598.2.camel@alice \
    --to=snakebyte@gmx.de \
    --cc=isdn4linux@listserv.isdn4linux.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox