From: Daniel Kurtz Date: Thu, 6 Oct 2011 22:43:20 +0000 (-0700) Subject: Input: atmel_mxt_ts - use snprintf for sysfs attribute show method X-Git-Tag: v3.2-rc1~145^2^2~21 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=626af8611211c55595cd316103abd2419cd4d861;p=pandora-kernel.git Input: atmel_mxt_ts - use snprintf for sysfs attribute show method Sysfs attribute show methods are always passed a buffer of length PAGE_SIZE. To keep from overwriting this buffer and causing havoc, use snprintf() to guarantee we never write more than the buffer can hold. In addition, at least for my touchscreen, the number and size of objects was far too big to fit in a single 4K page. Therefore, this patch also trims some redundant framing text to leave more room for actual data. Signed-off-by: Daniel Kurtz Acked-by: Nick Dyer Signed-off-by: Dmitry Torokhov --- Reading git-diff-tree failed