diff options
author | nyamatongwe <unknown> | 2009-08-01 05:26:45 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2009-08-01 05:26:45 +0000 |
commit | c291642134bb633d306eab4425447075369089f3 (patch) | |
tree | d260af0c5cc8762eadb127dc8e6e50ed7bbad9d1 /src/PerLine.cxx | |
parent | 7a247b1fc75ebfa2cbe197340b8c91f1cc31a8d7 (diff) | |
download | scintilla-mirror-c291642134bb633d306eab4425447075369089f3.tar.gz |
Fixed Bug #2830307 crash when adding marker to line beyond end of document.
Diffstat (limited to 'src/PerLine.cxx')
-rw-r--r-- | src/PerLine.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/PerLine.cxx b/src/PerLine.cxx index f8989691d..e2e892d76 100644 --- a/src/PerLine.cxx +++ b/src/PerLine.cxx @@ -188,11 +188,14 @@ int LineMarkers::AddMark(int line, int markerNum, int lines) { // No existing markers so allocate one element per line markers.InsertValue(0, lines, 0); } + if (line >= markers.Length()) { + return -1; + } if (!markers[line]) { // Need new structure to hold marker handle markers[line] = new MarkerHandleSet(); if (!markers[line]) - return - 1; + return -1; } markers[line]->InsertHandle(handleCurrent, markerNum); |