[CPUFREQ] fix show_trans_table
authorCesar Eduardo Barros <cesarb@cesarb.net>
Sat, 16 Feb 2008 10:41:25 +0000 (08:41 -0200)
committerDave Jones <davej@redhat.com>
Mon, 28 Apr 2008 19:05:44 +0000 (15:05 -0400)
commit25aca347d49ffc38aa3b7e63ce9b90df7f8b79c8
tree01ae9962d03db4ae07f808428600b5d3c725b607
parent74212ca432982903d0fc6a0f282b199e000ad8b1
[CPUFREQ] fix show_trans_table

Fix show_trans_table when it overflows PAGE_SIZE.

* Not all snprintf calls were protected against being passed a negative
length.
* When show_trans_table overflows, len might be > PAGE_SIZE. In that case,
returns PAGE_SIZE.

Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
Signed-off-by: Dave Jones <davej@codemonkey.org.uk>
drivers/cpufreq/cpufreq_stats.c