提交 792e313d 编写于 作者: Z zhangdengyu

feat:增强对LOS_ArchCopyToUser接口的安全防护

Close: #I61CLY
Signed-off-by: Nzhangdengyu <zhangdengyu2@huawei.com>
Change-Id: I9a0b97685599b74d7fe90f14a0c38bebd6e75166
上级 2406176f
......@@ -398,7 +398,7 @@ static int fb_ioctl(struct file *filep, int cmd, unsigned long arg)
case FBIOGET_VIDEOINFO: /* Get color plane info */
{
struct fb_videoinfo_s vinfo;
struct fb_videoinfo_s vinfo = { 0 };
DEBUGASSERT(fb->vtable != NULL &&
fb->vtable->getvideoinfo != NULL);
......@@ -416,7 +416,7 @@ static int fb_ioctl(struct file *filep, int cmd, unsigned long arg)
case FBIOGET_PLANEINFO: /* Get video plane info */
{
struct fb_planeinfo_s pinfo;
struct fb_planeinfo_s pinfo = { 0 };
DEBUGASSERT(fb->vtable != NULL &&
fb->vtable->getplaneinfo != NULL);
......@@ -435,7 +435,7 @@ static int fb_ioctl(struct file *filep, int cmd, unsigned long arg)
#ifdef CONFIG_FB_CMAP
case FBIOGET_CMAP: /* Get RGB color mapping */
{
struct fb_cmap_s cmap;
struct fb_cmap_s cmap = { 0 };
DEBUGASSERT(fb->vtable != NULL &&
fb->vtable->getcmap != NULL);
......@@ -470,7 +470,7 @@ static int fb_ioctl(struct file *filep, int cmd, unsigned long arg)
#ifdef CONFIG_FB_HWCURSOR
case FBIOGET_CURSOR: /* Get cursor attributes */
{
struct fb_cursorattrib_s attrib;
struct fb_cursorattrib_s attrib = { 0 };
DEBUGASSERT(fb->vtable != NULL &&
fb->vtable->getcursor != NULL);
......
......@@ -60,7 +60,7 @@
#define ferr PRINTK
#if CONFIG_NFILE_DESCRIPTORS > 0
struct filelist tg_filelist;
struct filelist tg_filelist = { 0 };
#endif
/****************************************************************************
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册