diff options
author | nyamatongwe <unknown> | 2012-06-04 12:49:48 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2012-06-04 12:49:48 +1000 |
commit | a2aa56d2cbf9a6c12e834adce3c5154b82292f7f (patch) | |
tree | e40c64b69b8d941dbe18090905af97e7c7c5bbd8 /src | |
parent | 2c8794ff9a7ef062b5023770b6f6d5e7d836fa4b (diff) | |
download | scintilla-mirror-a2aa56d2cbf9a6c12e834adce3c5154b82292f7f.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; |