[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20100322120918.GG21571@bicker>
Date: Mon, 22 Mar 2010 15:09:18 +0300
From: Dan Carpenter <error27@...il.com>
To: Thomas Winischhofer <thomas@...ischhofer.net>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Krzysztof Helt <krzysztof.h1@...pl>,
Roel Kluin <roel.kluin@...il.com>,
Michal Januszewski <spock@...too.org>,
Wu Zhangjin <wuzhangjin@...il.com>,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [patch] sis: strcpy() => strlcpy()
These are different size buffers (40 chars vs 16), we may as well be
cautious.
Signed-off-by: Dan Carpenter <error27@...il.com>
diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c
index a531a0f..559bf17 100644
--- a/drivers/video/sis/sis_main.c
+++ b/drivers/video/sis/sis_main.c
@@ -1845,7 +1845,7 @@ sisfb_get_fix(struct fb_fix_screeninfo *fix, int con, struct fb_info *info)
memset(fix, 0, sizeof(struct fb_fix_screeninfo));
- strcpy(fix->id, ivideo->myid);
+ strlcpy(fix->id, ivideo->myid, sizeof(fix->id));
mutex_lock(&info->mm_lock);
fix->smem_start = ivideo->video_base + ivideo->video_offset;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists