public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch] Off by one in drivers/usb/input/yealink.c
@ 2006-06-27 22:41 Eric Sesterhenn
  2006-06-27 22:51 ` Randy.Dunlap
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Sesterhenn @ 2006-06-27 22:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: Henk.Vergonet

hi,

another off by one spotted by coverity (id #485),
we loop exactly one time too often

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

--- linux-2.6.17-git11/drivers/usb/input/yealink.c.orig	2006-06-28 00:29:46.000000000 +0200
+++ linux-2.6.17-git11/drivers/usb/input/yealink.c	2006-06-28 00:30:04.000000000 +0200
@@ -350,7 +350,7 @@ static int yealink_do_idle_tasks(struct 
 		val = yld->master.b[ix];
 		if (val != yld->copy.b[ix])
 			goto send_update;
-	} while (++ix < sizeof(yld->master));
+	} while (++ix < sizeof(yld->master)-1);
 
 	/* nothing todo, wait a bit and poll for a KEYPRESS */
 	yld->stat_ix = 0;



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

end of thread, other threads:[~2006-07-06 14:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-27 22:41 [Patch] Off by one in drivers/usb/input/yealink.c Eric Sesterhenn
2006-06-27 22:51 ` Randy.Dunlap
2006-06-27 23:04   ` Eric Sesterhenn / Snakebyte
2006-06-27 23:18     ` Randy.Dunlap
2006-06-27 23:26       ` Eric Sesterhenn
2006-07-05 13:02   ` Henk Vergonet
     [not found]     ` <d120d5000607050655o44cb66c3s7616493c7507d4d8@mail.gmail.com>
2006-07-06  0:49       ` Eric Sesterhenn / Snakebyte
2006-07-06  2:25         ` Dmitry Torokhov
2006-07-06 14:41           ` Eric Sesterhenn / Snakebyte

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox