diff options
author | nyamatongwe <devnull@localhost> | 2009-08-01 05:26:45 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2009-08-01 05:26:45 +0000 |
commit | 5095d9a78682f03b8b517630b4a7dab108653650 (patch) | |
tree | d260af0c5cc8762eadb127dc8e6e50ed7bbad9d1 /src/PerLine.cxx | |
parent | 3984f799be68577a4dd1a4ca79e04d07963046fa (diff) | |
download | scintilla-mirror-5095d9a78682f03b8b517630b4a7dab108653650.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); |