Skip to content

Commit

Permalink
sis: strcpy() => strlcpy()
Browse files Browse the repository at this point in the history
These are different size buffers (40 chars vs 16), we may as well be
cautious.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Dan Carpenter authored and Linus Torvalds committed May 25, 2010
1 parent fbd65e0 commit dbd536b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/video/sis/sis_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit dbd536b

Please sign in to comment.