]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Fix memory management issues 840/head
authorNgie Cooper <yanegomi@gmail.com>
Sun, 11 Dec 2016 02:32:11 +0000 (18:32 -0800)
committerNgie Cooper <yanegomi@gmail.com>
Sun, 11 Dec 2016 02:40:40 +0000 (18:40 -0800)
commit15a23f96e1b10a5d336e75ab681c31bbc7d3d36b
tree4616f940aeeefba43fcf9e3f272e878e45b802ce
parent2787fd2cd813e579f799f01e1bb5425551938d59
Fix memory management issues

1. Assert that `f` isn't NULL to strengthen the guarantee that
   it's valid.
2. Assert that `rawimage` isn't NULL to strengthen the guarantee
   that it's valid.
3. Do not leak `tmp`
4. Free `rawimage` in all instances; NULL out the value to avoid
   double-free'ing it by accident

Reported by: Coverity
CID: 1331454 [1], 1361651 [2], 1361669 [3], 1361679 [4]
libarchive/test/test_fuzz.c