]> git.ipfire.org Git - thirdparty/grub.git/commit
io/gzio: Zero gzio->tl/td in init_dynamic_block() if huft_build() fails
authorDaniel Axtens <dja@axtens.net>
Thu, 21 Jan 2021 01:22:28 +0000 (12:22 +1100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 2 Mar 2021 14:54:18 +0000 (15:54 +0100)
commitb5a2b59cc5b8f5ee7ba3b951e7693e402d5b3a6f
treeaa3041db385be2276891f8153fbd5244f2b9be54
parent4e76b08f7171a8603d74fcafb27409a91f578647
io/gzio: Zero gzio->tl/td in init_dynamic_block() if huft_build() fails

If huft_build() fails, gzio->tl or gzio->td could contain pointers that
are no longer valid. Zero them out.

This prevents a double free when grub_gzio_close() comes through and
attempts to free them again.

Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/io/gzio.c