public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* drivers/input/touchscreen/gunze.c: gunze_process_packet: invalid array access
@ 2005-03-23  1:26 Adrian Bunk
  2005-03-24  0:41 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2005-03-23  1:26 UTC (permalink / raw)
  To: vojtech; +Cc: linux-input, linux-kernel

The Coverity checker found the following bug in the function 
gunze_process_packet in drivers/input/touchscreen/gunze.c:


<--  snip  -->

...
#define GUNZE_MAX_LENGTH        10
...
struct gunze {
...
        unsigned char data[GUNZE_MAX_LENGTH];
...
};
...
static void gunze_process_packet(struct gunze* gunze, struct pt_regs *regs)
...
                gunze->data[10] = 0;
...

<--  snip  -->


The bug is obvious, but for a correct solution someone should know this 
code better than I do.


cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

end of thread, other threads:[~2005-03-24  0:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-23  1:26 drivers/input/touchscreen/gunze.c: gunze_process_packet: invalid array access Adrian Bunk
2005-03-24  0:41 ` Dmitry Torokhov

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