From: Vasiliy Kulikov Date: Thu, 13 Jan 2011 00:59:14 +0000 (-0800) Subject: drivers/leds/leds-lp5521.c: fix potential buffer overflow X-Git-Tag: v2.6.38-rc1~396 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2260209c4973e3eeb1e48abaa9e639373a0d4fb7;p=pandora-kernel.git drivers/leds/leds-lp5521.c: fix potential buffer overflow The code doesn't check first sscanf() return value. If first sscanf() failed then c contains some garbage. It might lead to reading uninitialised stack data in the second sscanf() call. Signed-off-by: Vasiliy Kulikov Cc: Richard Purdie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed