]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libfdisk: fix uninitialized fdisk_labelitem
authorRuediger Meier <ruediger.meier@ga-group.nl>
Wed, 26 Oct 2016 15:04:30 +0000 (17:04 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 27 Oct 2016 08:43:45 +0000 (10:43 +0200)
commit14b7f754c9abb0ea213d7824766496e6a0152c58
treeaf2969642827bd985935fbef74b88b4ed3193cc6
parentf4126f98e165f3e3457ecdb2e3777fa79463cb79
libfdisk: fix uninitialized fdisk_labelitem

fdisk -l could crash randomly. Only seen on some i586 systems with
certain exotic compiler options.

The problem was that this item is later used in
function fdisk_reset_labelitem() like this:

    if (li->type == 's')
        free(li->data.str);

This may crash if item is randomly initialized.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
libfdisk/src/label.c