//\r
if (!mOptions.OutFileName[0]) {\r
if (mOptions.FileList != NULL) {\r
- strcpy (mOptions.OutFileName, mOptions.FileList->FileName);\r
+ if (strlen (mOptions.FileList->FileName) >= MAX_PATH) {\r
+ Status = STATUS_ERROR;\r
+ Error (NULL, 0, 2000, "Invalid parameter", "Input file name is too long - %s.", mOptions.FileList->FileName);\r
+ goto BailOut;\r
+ }\r
+ strncpy (mOptions.OutFileName, mOptions.FileList->FileName, MAX_PATH - 1);\r
+ mOptions.OutFileName[MAX_PATH - 1] = 0;\r
//\r
// Find the last . on the line and replace the filename extension with\r
// the default\r