commit | a76de3a030f20f973a136457eb8fa5a7f2824b7f | [log] [tgz] |
---|---|---|
author | bohu <bohu@google.com> | Tue Aug 01 11:40:14 2017 -0700 |
committer | bohu <bohu@google.com> | Tue Aug 01 14:40:46 2017 -0700 |
tree | 2de12b812b4833c5dd5e879f3c734ecb9cbecbd9 | |
parent | ca9256d857cdcae985ef8c7e78a1cb89e5d2dd54 [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. BUG: 64235252 Change-Id: I203dd5bc42bb7ce83e558f25074c7e1a92f250e9 (cherry picked from commit 69e46b9a1cd70aa92fefb3d7a8738c6876df4659)