xf86-video-mga: Changes to 'master'

Alan Coopersmith alanc at kemper.freedesktop.org
Thu Dec 29 10:18:21 PST 2011


 src/mga_video.c |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit cc9d2e808de20723c9035952242d966455d583b7
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Wed Dec 28 19:44:40 2011 -0800

    Check MGAAllocAdaptor() for memory allocation failure
    
    If it couldn't allocate memory, don't attempt to write a bunch of values
    to the NULL pointer before returning it, but just pass the NULL along
    right away.
    
    Resolves parfait warnings of the form:
    
    Error: Null pointer dereference (CWE 476)
       Write to null pointer 'adapt'
            at line 322 of src/mga_video.c in function 'MGASetupImageVideoTexture'.
              Function 'MGAAllocAdaptor' may return constant 'NULL' at line 237, called at line 320.
              Null pointer introduced at line 237 in function 'MGAAllocAdaptor'.
    
    repeated for every line writing to the adapt pointer in each function.
    
    [ This bug was found by the Parfait 0.4.2 bug checking tool.
      For more information see http://labs.oracle.com/projects/parfait/ ]
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Reviewed-by: Mark Kettenis <kettenis at openbsd.org>



More information about the xorg-commit mailing list