Skip to content
Snippets Groups Projects
Commit 0c7af6fa authored by bohu's avatar bohu Committed by android-build-merger
Browse files

gptfdisk: fix stack overflow in parsing cmdline am: 69e46b9a am: 8c834de1

am: ff3551bb

Change-Id: I6678487f46848c2de3d77bf7a75ec67634c82921
parents ca9256d8 ff3551bb
No related branches found
No related tags found
No related merge requests found
......@@ -98,7 +98,7 @@ int poptGetNextOpt(poptContext con) {
#ifdef LOCAL_DEBUG
fprintf(stderr, "getopt_long()=%c\n", res);
#endif
if (res == 0 || res == '?') {
if (res <= 0 || res == '?' || i == -1) {
return -1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment