elfctl: initialize features

GCC points out a couple levels down in convert_to_features that this may be
used uninitialized. Indeed, this is true- initialize it to NULL so that we
at least deref a null pointer.
This commit is contained in:
Kyle Evans 2020-03-02 04:22:38 +00:00
parent 072afcdffc
commit fdafb99d81

View File

@ -92,6 +92,7 @@ main(int argc, char **argv)
lflag = 0; lflag = 0;
editfeatures = 0; editfeatures = 0;
retval = 0; retval = 0;
features = NULL;
if (elf_version(EV_CURRENT) == EV_NONE) if (elf_version(EV_CURRENT) == EV_NONE)
errx(EXIT_FAILURE, "elf_version error"); errx(EXIT_FAILURE, "elf_version error");