lkml.org 
[lkml]   [2004]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH]: Fix NULL-ptr dereference in pm2fb_probe
    This patch fixes a NULL-pointer dereference in pm2fb_probe.
    The memset sets info->par to 0, it is dereferenced shortly
    afterwards. framebuffer_alloc already initializes the memory
    to 0, so it can simply be removed.

    Regards
    Patrick


    # This is a BitKeeper generated diff -Nru style patch.
    #
    # ChangeSet
    # 2004/04/23 04:05:58+02:00 kaber@trash.net
    # Fix NULL-ptr dereference in pm2fb_probe
    #
    # drivers/video/pm2fb.c
    # 2004/04/23 03:59:41+02:00 kaber@trash.net +0 -2
    # Fix NULL-ptr dereference in pm2fb_probe
    #
    diff -Nru a/drivers/video/pm2fb.c b/drivers/video/pm2fb.c
    --- a/drivers/video/pm2fb.c Fri Apr 23 04:06:53 2004
    +++ b/drivers/video/pm2fb.c Fri Apr 23 04:06:53 2004
    @@ -1035,8 +1035,6 @@
    info = framebuffer_alloc(size, &pdev->dev);
    if ( !info )
    return -ENOMEM;
    - memset(info, 0, size);
    -
    default_par = info->par;

    switch (pdev->device) {
    \
     
     \ /
      Last update: 2005-03-22 14:02    [W:0.023 / U:1.116 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site