Fix potential out-of-bounds access

pull/32/head
Chocobo1 2016-03-20 19:04:03 +08:00
parent f1ce93e5d5
commit 8eac50fadd
1 changed files with 1 additions and 1 deletions

2
main.c
View File

@ -69,7 +69,7 @@ VerifyAutoConnections()
int i;
BOOL match;
for (i = 0; o.auto_connect[i] != 0 && i < MAX_CONFIGS; i++)
for (i = 0; i < MAX_CONFIGS && o.auto_connect[i] != 0; i++)
{
int j;
match = FALSE;