commit | 8373d68c0b00dde373a683518da874e376086665 | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Sat Nov 16 11:18:50 2019 -0800 |
committer | Elliott Hughes <enh@google.com> | Sat Nov 16 11:18:50 2019 -0800 |
tree | d2c37d67ad695d0ac7ca6f14741749191c8a379c | |
parent | ac67316483ade40ac3659a2d48000af66172c683 [diff] [blame] |
ziptool: fix unknown long options. Previously an unknown long option would cause a crash as we ran off the end of the array. Test: `ziptool unzip --unknown` Change-Id: I7a7b6ac4a0fa157c111f936e837c20143cef9e28
diff --git a/unzip.cpp b/unzip.cpp index 56f594a..11b575e 100644 --- a/unzip.cpp +++ b/unzip.cpp
@@ -448,6 +448,7 @@ static const struct option opts[] = { {"help", no_argument, 0, 'h'}, + {}, }; if (role == kUnzip) {