* [patch] sis: strcpy() => strlcpy()
@ 2010-03-22 12:09 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-03-22 12:09 UTC (permalink / raw)
To: Thomas Winischhofer
Cc: Andrew Morton, Krzysztof Helt, Roel Kluin, Michal Januszewski,
Wu Zhangjin, linux-kernel, kernel-janitors
These are different size buffers (40 chars vs 16), we may as well be
cautious.
Signed-off-by: Dan Carpenter <error27@gmail.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;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-22 12:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-22 12:09 [patch] sis: strcpy() => strlcpy() Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox