aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorAntonino A. Daplas <adaplas@gmail.com>2006-03-11 06:27:28 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-11 12:19:36 -0500
commited62178589929d248a0aaf4018ca3867e2f96d9d (patch)
tree3dce07a9f0fa8bd6f5758174a1db80a090ea368b /drivers/video
parent8e6509876c5cb079f56dbe334aafaae9a293c886 (diff)
[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 <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/aty/radeon_monitor.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/video/aty/radeon_monitor.c b/drivers/video/aty/radeon_monitor.c
index 7f9838dceab5..98c05bc0de44 100644
--- a/drivers/video/aty/radeon_monitor.c
+++ b/drivers/video/aty/radeon_monitor.c
@@ -396,6 +396,10 @@ static int __devinit radeon_parse_monitor_layout(struct radeonfb_info *rinfo,
396 s1[i] = *s; 396 s1[i] = *s;
397 i++; 397 i++;
398 } 398 }
399
400 if (i > 4)
401 i = 4;
402
399 } while (*s++); 403 } while (*s++);
400 if (second) 404 if (second)
401 s2[i] = 0; 405 s2[i] = 0;