pcmcia: fix read buffer overflow
authorRoel Kluin <roel.kluin@gmail.com>
Tue, 22 Sep 2009 00:03:54 +0000 (17:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 22 Sep 2009 14:17:42 +0000 (07:17 -0700)
commit470967dc6c38696f853b7f338eb9d743c28a9e11
tree9dac40e966a5bb4a902f9cdb8ea0701fe964b85f
parent734f3fa18d460995c8621cf2331b7fba88c977ce
pcmcia: fix read buffer overflow

If count > 0 and dev->rlen == dev->rpos and dev->proto == 0 then we read
and write dev->rbuf[-1];

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Harald Welte <laforge@gnumonks.org>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/pcmcia/cm4000_cs.c