aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/elfctl/elfctl.c
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2020-03-02 04:22:38 +0000
committerKyle Evans <kevans@FreeBSD.org>2020-03-02 04:22:38 +0000
commitfdafb99d81ae0ee65863ba6c419c50b7a39d5b51 (patch)
treece57dffa367607789c83f6b94c776aca22729543 /usr.bin/elfctl/elfctl.c
parent072afcdffca7de7416bf71f82a9b5bcc869afad2 (diff)
downloadsrc-fdafb99d81ae0ee65863ba6c419c50b7a39d5b51.tar.gz
src-fdafb99d81ae0ee65863ba6c419c50b7a39d5b51.zip
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.
Notes
Notes: svn path=/head/; revision=358518
Diffstat (limited to 'usr.bin/elfctl/elfctl.c')
-rw-r--r--usr.bin/elfctl/elfctl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.bin/elfctl/elfctl.c b/usr.bin/elfctl/elfctl.c
index 1eaa0fb86181..abc2758b8acc 100644
--- a/usr.bin/elfctl/elfctl.c
+++ b/usr.bin/elfctl/elfctl.c
@@ -92,6 +92,7 @@ main(int argc, char **argv)
lflag = 0;
editfeatures = 0;
retval = 0;
+ features = NULL;
if (elf_version(EV_CURRENT) == EV_NONE)
errx(EXIT_FAILURE, "elf_version error");