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
This commit is contained in:
parent
dc4bd2714c
commit
2ab5a70b9f
1 changed files with 1 additions and 0 deletions
|
@ -448,6 +448,7 @@ int main(int argc, char* argv[]) {
|
|||
|
||||
static const struct option opts[] = {
|
||||
{"help", no_argument, 0, 'h'},
|
||||
{},
|
||||
};
|
||||
|
||||
if (role == kUnzip) {
|
||||
|
|
Loading…
Reference in a new issue