]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Initialize subst rule->result pointer to NULL 790/head
authorGraham Percival <gperciva@tarsnap.com>
Wed, 28 Sep 2016 18:02:34 +0000 (11:02 -0700)
committerGraham Percival <gperciva@tarsnap.com>
Wed, 28 Sep 2016 18:02:34 +0000 (11:02 -0700)
commit6d3ba9c0a03e57e20873ecd836da310fa3c9ddab
treea8068430f0d49263ab2c61e28ff5a8885bf8245e
parentc251dca85a5ff3c9ed777d3407d14897c82286bd
Initialize subst rule->result pointer to NULL

This is not directly useful in libarchive at the present time, but
it might be in the future.  If a project which uses this code adds
an atexit(3) handler to clean up memory, and somebody runs:
    bsdtar somestring -t
then "omestring" will be interpreted as an (invalid) substitution
rule and call lafe_errc().  However, if the atexit() handler then
calls cleanup_substition(), it will try to free(rule->result)
which was not initialized.

Sponsored by: Tarsnap Backup Inc.
tar/subst.c