Skip to content

Commit

Permalink
MergeDocLineDiffs.cpp: Avoid out of bounds access
Browse files Browse the repository at this point in the history
  • Loading branch information
sdottaka committed May 21, 2017
1 parent 0dbaeb2 commit 56978f6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Src/MergeDocLineDiffs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ void CMergeDoc::GetWordDiffArray(int nLineIndex, vector<WordDiff> *pWordDiffs)

for (file = 0; file < m_nBuffers; file++)
{
if (m_ptBuf[file]->GetLineCount() >= nLineEnd)
return;
nOffsets[file].reset(new int[nLineEnd - nLineBegin + 1]);
CString strText;
if (nLineBegin != nLineEnd || m_ptBuf[file]->GetLineLength(nLineEnd) > 0)
Expand Down

0 comments on commit 56978f6

Please sign in to comment.