[PATCH] parport: buffer overflow fix
authorMarko Kohtala <marko.kohtala@gmail.com>
Fri, 6 Jan 2006 08:19:43 +0000 (00:19 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 6 Jan 2006 16:33:56 +0000 (08:33 -0800)
commitc660629059abbbd0eb56e12f9bb4494f01800bbc
treeda6a8d3a38e0c2e91b45dda210dc9f56306027a0
parent39ee059affaf57a152c64cd3a0adc3f48f02ed71
[PATCH] parport: buffer overflow fix

Fix potential buffer overflow in case the device ID did not end in semicolon.
Also might fail to negotiate back to IEEE1284_MODE_COMPAT in case of failure.
parport_device_id did not return what Documentation/parport-lowlevel.txt said,
so I changed it to match it.

Determining device ID length is overly complicated, but Tim Waugh recalled on
linux-parport seeing some buggy device that might need it.

Signed-off-by: Marko Kohtala <marko.kohtala@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/parport/probe.c