Skip to content

Commit

Permalink
Fix possible out-of-bounds buffer write
Browse files Browse the repository at this point in the history
  • Loading branch information
scotty007 committed Jun 26, 2020
1 parent 2ba4a5b commit 4957bb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/base/Backtrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ void getBacktrace(vector<string>& sFuncs)
sFuncName = pszDemangledFuncName;
free(pszDemangledFuncName);
}
char szLineNum[10];
sprintf(szLineNum, "%3d", i);
char szLineNum[12];
snprintf(szLineNum, 11, "%3d", i);
sFuncs.push_back(string(szLineNum)+" "+sFuncName);
}
free(ppszLines);
Expand Down

0 comments on commit 4957bb8

Please sign in to comment.