diff options
| author | Neil <nyamatongwe@gmail.com> | 2015-10-19 21:52:08 +1100 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2015-10-19 21:52:08 +1100 | 
| commit | ef75a00a35ddc6dbd8593f3fb94e8fbe048ff410 (patch) | |
| tree | 32dab69789f83ab7675f772ebc81d2d0fa29164a /src/Editor.cxx | |
| parent | 0d0f2a1cc688e39fda86273cb32d28053a237137 (diff) | |
| download | scintilla-mirror-ef75a00a35ddc6dbd8593f3fb94e8fbe048ff410.tar.gz | |
Bug [#1768]. Report error when negative length passed to SCI_SETSTYLING.
Diffstat (limited to 'src/Editor.cxx')
| -rw-r--r-- | src/Editor.cxx | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/src/Editor.cxx b/src/Editor.cxx index 8a3a367db..6141b0628 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -6267,7 +6267,10 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {  		break;  	case SCI_SETSTYLING: -		pdoc->SetStyleFor(static_cast<int>(wParam), static_cast<char>(lParam)); +		if (static_cast<int>(wParam) < 0) +			errorStatus = SC_STATUS_FAILURE; +		else +			pdoc->SetStyleFor(static_cast<int>(wParam), static_cast<char>(lParam));  		break;  	case SCI_SETSTYLINGEX:             // Specify a complete styling buffer | 
