parisc: isa-eeprom - Fix loff_t usage
authorMichael Buesch <mb@bu3sch.de>
Mon, 20 Jul 2009 22:58:44 +0000 (22:58 +0000)
committerHelge Deller <deller@gmx.de>
Sun, 2 Aug 2009 10:35:52 +0000 (12:35 +0200)
commit6b4dbcd86a9d464057fcc7abe4d0574093071fcc
treedd1dc64562db85a382a6118335821c311809cac3
parent450d6e306b4717bfae11218a02648509baf04ce1
parisc: isa-eeprom - Fix loff_t usage

loff_t is a signed type. If userspace passes a negative ppos, the "count"
range check is weakened. "count"s bigger than HPEE_MAX_LENGTH will pass the check.
Also, if ppos is negative, the readb(eisa_eeprom_addr + *ppos) will poke in random
memory.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: stable@kernel.org
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/parisc/eisa_eeprom.c