lkml.org 
[lkml]   [2010]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    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@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;

    \
     
     \ /
      Last update: 2010-03-22 13:11    [W:0.020 / U:33.012 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site