Fix out-of-bounds write when passing a map filename to Mapster32.

git-svn-id: https://svn.eduke32.com/eduke32@2194 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2011-12-21 18:43:24 +00:00
parent b72972e43b
commit 2f7851336b

View file

@ -496,10 +496,11 @@ int32_t app_main(int32_t argc, const char **argv)
}
continue;
}
if (!boardfilename[0])
{
Bstrncpy(boardfilename, argv[i], BMAX_PATH);
boardfilename[i-BMAX_PATH] = 0;
boardfilename[BMAX_PATH-1] = 0;
}
}
if (boardfilename[0] == 0)