From: Dan Carpenter Date: Mon, 24 May 2010 21:33:53 +0000 (-0700) Subject: sis: strcpy() => strlcpy() X-Git-Tag: firefly_0821_release~9833^2~1900 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=dbd536bf2f1b494240b56035ee16eba2e3d89b6a;p=firefly-linux-kernel-4.4.55.git sis: strcpy() => strlcpy() These are different size buffers (40 chars vs 16), we may as well be cautious. Signed-off-by: Dan Carpenter Cc: Thomas Winischhofer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c index a531a0f7cdf2..559bf1727a2b 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;