Skip to content

Commit 70264bf

Browse files
committed
GOB: Fix a crash in degob for some command line args combinations
1 parent 3ffa73b commit 70264bf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

engines/gob/degob.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,11 @@ int main(int argc, char **argv) {
8989
n++;
9090
}
9191

92-
if (!strncmp(argv[n], "--lib", 5)) {
93-
libMode = true;
94-
n++;
92+
if (argc > n) {
93+
if (!strncmp(argv[n], "--lib", 5)) {
94+
libMode = true;
95+
n++;
96+
}
9597
}
9698

9799
if (argc > n) {

0 commit comments

Comments
 (0)