mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
[PATCH] radeonfb: Fix static array overrun
radeonfb_parse_monitor_layout() will produce an array overrun if passed with a substring of length higher than 4 (ie, "XXXXX,YYYYYY"). Coverity Bug 494 Signed-off-by: Antonino Daplas <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
8e6509876c
commit
ed62178589
1 changed files with 4 additions and 0 deletions
|
|
@ -396,6 +396,10 @@ static int __devinit radeon_parse_monitor_layout(struct radeonfb_info *rinfo,
|
|||
s1[i] = *s;
|
||||
i++;
|
||||
}
|
||||
|
||||
if (i > 4)
|
||||
i = 4;
|
||||
|
||||
} while (*s++);
|
||||
if (second)
|
||||
s2[i] = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue