diff options
author | nyamatongwe <devnull@localhost> | 2012-06-04 12:49:48 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2012-06-04 12:49:48 +1000 |
commit | 763576bdf35f31630674a39dd30d4b9c2bf5fdaf (patch) | |
tree | 9234b3f7b55fa184c2684dbe716e528f56b5d0c4 /src | |
parent | a6fb91a540a595734e251b16db12370257c6f9cf (diff) | |
download | scintilla-mirror-763576bdf35f31630674a39dd30d4b9c2bf5fdaf.tar.gz |
Validate length of deletion: negative values caused crashes.
Diffstat (limited to 'src')
-rw-r--r-- | src/Document.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index 82b9e070b..73dfda547 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -751,7 +751,7 @@ void Document::CheckReadOnly() { // SetStyleAt does not change the persistent state of a document bool Document::DeleteChars(int pos, int len) { - if (len == 0) + if (len <= 0) return false; if ((pos + len) > Length()) return false; |