[coreboot-gerrit] Patch merged into coreboot/master: util/cbfstool: Initialize elf_writer pointer to avoid crash

gerrit at coreboot.org gerrit at coreboot.org
Wed Aug 10 21:13:09 CEST 2016


the following patch was just integrated into master:
commit 5de5458c2c65c47b731552bd1c97473f186ea877
Author: Jonathan Neuschäfer <j.neuschaefer at gmx.net>
Date:   Tue Aug 9 15:01:58 2016 +0200

    util/cbfstool: Initialize elf_writer pointer to avoid crash
    
    If some error happens in cbfs_payload_make_elf, the code jumps to "out",
    and elf_writer_destroy(ew) is called. This may happen before an elf
    writer is allocated.
    To avoid accessing an uninitialized pointer, initialize ew to NULL;
    elf_writer_destroy will perform no action in this case.
    
    Change-Id: I5f1f9c4d37f2bdeaaeeca7a15720c7b4c963d953
    Reported-By: Coverity Scan (1361475)
    Signed-off-by: Jonathan Neuschäfer <j.neuschaefer at gmx.net>
    Reviewed-on: https://review.coreboot.org/16124
    Tested-by: build bot (Jenkins)
    Reviewed-by: Aaron Durbin <adurbin at chromium.org>


See https://review.coreboot.org/16124 for details.

-gerrit



More information about the coreboot-gerrit mailing list