]> git.ipfire.org Git - thirdparty/libarchive.git/commit
In the event the heap allocation fails after a successful allocation,
authorNgie Cooper <yanegomi@gmail.com>
Tue, 13 Dec 2016 07:03:27 +0000 (23:03 -0800)
committerNgie Cooper <yanegomi@gmail.com>
Wed, 14 Dec 2016 04:05:58 +0000 (20:05 -0800)
commitb7b12fad8d80133a2aef6a72e4abc3439e6c6ec9
treecbd73c80445d0090693aaf209e961bbf82e30ced
parent54546be8a7a2e69738247d68f4f6c253430a3d6f
In the event the heap allocation fails after a successful allocation,
restore fmtbuff back to fmtbuff_stack, per the intent of the else
condition

Otherwise, there's a chance that fmtbuff used after the mbtowc call
is using an invalid buffer, as fmtbuff_heap has been already free'd.

Reported by: Coverity
CID: 1006126
tar/util.c