netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mISDN: Read buffer overflow
@ 2009-07-31 13:43 Roel Kluin
  2009-07-31 14:28 ` Karsten Keil
  2009-08-02 19:31 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Roel Kluin @ 2009-07-31 13:43 UTC (permalink / raw)
  To: isdn, netdev, Andrew Morton

Check whether index is within bounds before testing the element.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/isdn/mISDN/l1oip_core.c b/drivers/isdn/mISDN/l1oip_core.c
index c3b661a..7e5f30d 100644
--- a/drivers/isdn/mISDN/l1oip_core.c
+++ b/drivers/isdn/mISDN/l1oip_core.c
@@ -1480,7 +1480,7 @@ l1oip_init(void)
 		return -ENOMEM;
 
 	l1oip_cnt = 0;
-	while (type[l1oip_cnt] && l1oip_cnt < MAX_CARDS) {
+	while (l1oip_cnt < MAX_CARDS && type[l1oip_cnt]) {
 		switch (type[l1oip_cnt] & 0xff) {
 		case 1:
 			pri = 0;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mISDN: Read buffer overflow
  2009-07-31 13:43 [PATCH] mISDN: Read buffer overflow Roel Kluin
@ 2009-07-31 14:28 ` Karsten Keil
  2009-08-02 19:31 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Karsten Keil @ 2009-07-31 14:28 UTC (permalink / raw)
  To: Roel Kluin; +Cc: netdev, Andrew Morton, Andreas Eversberg

On Freitag, 31. Juli 2009 15:43:59 Roel Kluin wrote:

Ouch !
Acked-by: Karsten Keil <keil@b1-systems.de>

> Check whether index is within bounds before testing the element.
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> diff --git a/drivers/isdn/mISDN/l1oip_core.c
> b/drivers/isdn/mISDN/l1oip_core.c index c3b661a..7e5f30d 100644
> --- a/drivers/isdn/mISDN/l1oip_core.c
> +++ b/drivers/isdn/mISDN/l1oip_core.c
> @@ -1480,7 +1480,7 @@ l1oip_init(void)
>  		return -ENOMEM;
>
>  	l1oip_cnt = 0;
> -	while (type[l1oip_cnt] && l1oip_cnt < MAX_CARDS) {
> +	while (l1oip_cnt < MAX_CARDS && type[l1oip_cnt]) {
>  		switch (type[l1oip_cnt] & 0xff) {
>  		case 1:
>  			pri = 0;


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mISDN: Read buffer overflow
  2009-07-31 13:43 [PATCH] mISDN: Read buffer overflow Roel Kluin
  2009-07-31 14:28 ` Karsten Keil
@ 2009-08-02 19:31 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2009-08-02 19:31 UTC (permalink / raw)
  To: roel.kluin; +Cc: isdn, netdev, akpm

From: Roel Kluin <roel.kluin@gmail.com>
Date: Fri, 31 Jul 2009 15:43:59 +0200

> Check whether index is within bounds before testing the element.
> 
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-08-02 19:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-31 13:43 [PATCH] mISDN: Read buffer overflow Roel Kluin
2009-07-31 14:28 ` Karsten Keil
2009-08-02 19:31 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).