UPSTREAM: char: lp: fix possible integer overflow in lp_setup()

The lp_setup() code doesn't apply any bounds checking when passing
"lp=none", and only in this case, resulting in an overflow of the
parport_nr[] array. All versions in Git history are affected.

Reported-By: Roee Hay <>
Cc: Ben Hutchings <>
Signed-off-by: Willy Tarreau <>
Signed-off-by: Greg Kroah-Hartman <>
(cherry picked from commit 3e21f4af170bebf47c187c1ff8bf155583c9f3b1)
Bug: 64256034
Change-Id: I4ea9d90861437eec97df3bf21292c711c57f0ff8
1 file changed