aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-08-19 09:20:25 +1000
committerNeil <nyamatongwe@gmail.com>2014-08-19 09:20:25 +1000
commit018905af4d2dace5439de1b3ef119af4529e9392 (patch)
tree35874aa01a7435a3bc0cb08dd41677fa1e4a7015 /src
parent1242f39a289ec09079144d6e6c06b88ce58df50a (diff)
downloadscintilla-mirror-018905af4d2dace5439de1b3ef119af4529e9392.tar.gz
Bug [#1645]. Validate position of deletion.
Diffstat (limited to 'src')
-rw-r--r--src/Document.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Document.cxx b/src/Document.cxx
index 4c1901679..e9824d9dd 100644
--- a/src/Document.cxx
+++ b/src/Document.cxx
@@ -937,6 +937,8 @@ void Document::CheckReadOnly() {
// SetStyleAt does not change the persistent state of a document
bool Document::DeleteChars(int pos, int len) {
+ if (pos < 0)
+ return false;
if (len <= 0)
return false;
if ((pos + len) > Length())