diff options
author | Robby Cai <r63905@freescale.com> | 2015-02-15 14:00:14 +0800 |
---|---|---|
committer | Robby Cai <r63905@freescale.com> | 2015-02-15 16:04:28 +0800 |
commit | 6b4144acdbc63f0161cdc30e9c8d23d738e0ff12 (patch) | |
tree | 887c3343ef0c1bee37d7d99e43db398775d41510 | |
parent | a95e6f53b8c4e24b34352555bda69d311358ecaa (diff) |
MLK-10248 video: ipuv3-fb: fix hang up with cmdline option for CLAA WVGA
The kernel boot stops at "Starting kernel ..." if assign cmdline
"video=mxcfb0:dev=lcd,if=RGB565".
The cause is that there's no 'mode_str' property for mxcfb0 in DTS file,
so of_property_read_string() does not touch it and 'mode_str' could be used
uninitialized in mxcfb_get_of_property(), where it's assigned to
plat_data->mode_str and then used uninitialized in fb_find_mode().
This may cause buffer overflow. This patch initializes 'mode_str' to NULL
to fix it.
Signed-off-by: Robby Cai <r63905@freescale.com>
(cherry picked from commit 115d11804b7b56d058ee6be8496b13f57869be93)
-rw-r--r-- | drivers/video/mxc/mxc_ipuv3_fb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/mxc/mxc_ipuv3_fb.c b/drivers/video/mxc/mxc_ipuv3_fb.c index 9d074f9e7a80..1fbfc9dd980a 100644 --- a/drivers/video/mxc/mxc_ipuv3_fb.c +++ b/drivers/video/mxc/mxc_ipuv3_fb.c @@ -1,5 +1,5 @@ /* - * Copyright 2004-2014 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright 2004-2015 Freescale Semiconductor, Inc. All Rights Reserved. */ /* @@ -2275,7 +2275,7 @@ static int mxcfb_get_of_property(struct platform_device *pdev, { struct device_node *np = pdev->dev.of_node; const char *disp_dev; - const char *mode_str; + const char *mode_str = NULL; const char *pixfmt; int err; int len; |