commit | 69e46b9a1cd70aa92fefb3d7a8738c6876df4659 | [log] [tgz] |
---|---|---|
author | bohu <bohu@google.com> | Tue Aug 01 11:40:14 2017 -0700 |
committer | bohu <bohu@google.com> | Tue Aug 01 11:46:47 2017 -0700 |
tree | c18d1d24692f53d159b23255941ab280e46cf9bc | |
parent | 165c596ac3c69ecbc5a424ad9c1f1be6d44d0bb3 [diff] |
gptfdisk: fix stack overflow in parsing cmdline The getopt_long will return -1 when all command-line options have been parsed, and the index value will not be changed in that case. The caller should check both and handle it properly. Change-Id: I203dd5bc42bb7ce83e558f25074c7e1a92f250e9