From: Chen Gang Date: Thu, 30 May 2013 03:35:22 +0000 (+0800) Subject: arch: sparc: prom: looping issue, need additional length check in the outside looping X-Git-Tag: v3.10-rc7~22^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=242ece22f0bd90e237365e51c5bd90a21693d6c3;p=pandora-kernel.git arch: sparc: prom: looping issue, need additional length check in the outside looping When "cp >= barg_buf + BARG_LEN-2", it breaks internel looping 'while', but outside loop 'for' still has effect, so "*cp++ = ' '" will continue repeating which may cause memory overflow. So need additional length check for it in the outside looping. Also beautify the related code which found by "./scripts/checkpatch.pl" Signed-off-by: Chen Gang Signed-off-by: David S. Miller --- Reading git-diff-tree failed