diff options
author | Antonino A. Daplas <adaplas@gmail.com> | 2005-09-09 22:10:02 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 23:03:40 +0200 |
commit | 61ab7903b8cd772d3bfb28bc26d02c599cfb0e5b (patch) | |
tree | 4140b59ec3882a954b620ebbee56d6c7bcdf781d /drivers/video/fbmon.c | |
parent | [PATCH] nvidiafb: Fixed mirrored characters in big endian machines (diff) | |
download | linux-61ab7903b8cd772d3bfb28bc26d02c599cfb0e5b.tar.xz linux-61ab7903b8cd772d3bfb28bc26d02c599cfb0e5b.zip |
[PATCH] fbdev: Initialize var structure in calc_mode_timings
The var structure in calc_mode_timings is not properly initialized (zero set)
which leads to undefined behavior when it is passed to fb_get_mode().
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/fbmon.c')
-rw-r--r-- | drivers/video/fbmon.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c index 791bec3d672a..713226cdf3c6 100644 --- a/drivers/video/fbmon.c +++ b/drivers/video/fbmon.c @@ -314,11 +314,13 @@ static int edid_is_monitor_block(unsigned char *block) return 0; } -static void calc_mode_timings(int xres, int yres, int refresh, struct fb_videomode *mode) +static void calc_mode_timings(int xres, int yres, int refresh, + struct fb_videomode *mode) { struct fb_var_screeninfo var; struct fb_info info; + memset(&var, 0, sizeof(struct fb_var_screeninfo)); var.xres = xres; var.yres = yres; fb_get_mode(FB_VSYNCTIMINGS | FB_IGNOREMON, |