From: Chase Douglas Date: Tue, 15 Jun 2010 16:29:15 +0000 (-0400) Subject: tracing/function-graph: Use correct string size for snprintf X-Git-Tag: v2.6.36-rc1~532^2~45 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d62f85d1e22e537192ce494c89540e1ac0d8bfc7;p=pandora-kernel.git tracing/function-graph: Use correct string size for snprintf The nsecs_str string is a local variable defined as: char nsecs_str[5]; It is possible for the snprintf call to use a size value larger than the size of the string. This should not cause a buffer overrun as it is written now due to the value for the string format "%03lu" can not be larger than 1000. However, this change makes it correct. By making the size correct we guard against potential future changes that could actually cause a buffer overrun. Signed-off-by: Chase Douglas LKML-Reference: <1276619355-18116-1-git-send-email-chase.douglas@canonical.com> [ added 'UL' to number 8 to fix gcc warning comparing it to sizeof() ] Signed-off-by: Steven Rostedt --- Reading git-diff-tree failed