Skip to content
Commit 242ece22 authored by Chen Gang's avatar Chen Gang Committed by David S. Miller
Browse files

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: default avatarChen Gang <gang.chen@asianux.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dbebe0da
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment