From: Bruno Prémont Date: Wed, 19 Sep 2012 19:18:10 +0000 (+0200) Subject: HID: picoLCD: bounds check in dump_buff_as_hex() X-Git-Tag: omap-for-v3.7-rc1/fixes-cpufreq-signed~104^2~2^4~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ed84c341c25accc61410cfb53a45170f8fb19e4;p=pandora-kernel.git HID: picoLCD: bounds check in dump_buff_as_hex() Make sure we keep enough space for terminating NUL character after last newline. If we have too much data, replace last byte with '.'s to make overflow visible. Using hex_dump_to_buffer() is not interesting as it adds more overhead and does not append the trailing linefeed. Reported-by: Dan Carpenter Signed-off-by: Bruno Prémont Signed-off-by: Jiri Kosina --- Reading git-diff-tree failed