Skip to content
This repository has been archived by the owner on Dec 22, 2020. It is now read-only.

Commit

Permalink
Fix writing past allocated memory
Browse files Browse the repository at this point in the history
*  fix from google#10
  • Loading branch information
bonizz committed Apr 6, 2017
1 parent e2e733c commit 9d181ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion EtcTool/EtcTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ bool Commands::ProcessCommandLineArguments(int a_iArgs, const char *a_apstrArgs[
if (pstrOutputFilename[c] == ETC_PATH_SLASH)
{
c++;
ptrOutputDir = new char[c];
ptrOutputDir = new char[c+1];
strncpy(ptrOutputDir, pstrOutputFilename, c);
ptrOutputDir[c] = '\0';
CreateNewDir(ptrOutputDir);
Expand Down

0 comments on commit 9d181ff

Please sign in to comment.