diff options
| author | Zufu Liu <unknown> | 2020-04-30 20:18:43 +1000 |
|---|---|---|
| committer | Zufu Liu <unknown> | 2020-04-30 20:18:43 +1000 |
| commit | b234bfefb654bc13420698e87f5c5a83c3bb9662 (patch) | |
| tree | 0b86259236d4cc0531776e96b83faef708d4d822 /lexers/LexMMIXAL.cxx | |
| parent | 1aee5f9e2a49a64a20b03d6b71cb9a38ca691ae3 (diff) | |
| download | scintilla-mirror-b234bfefb654bc13420698e87f5c5a83c3bb9662.tar.gz | |
Bug [#2019]. Fix buffer over-read with absolute reference.
Diffstat (limited to 'lexers/LexMMIXAL.cxx')
| -rw-r--r-- | lexers/LexMMIXAL.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lexers/LexMMIXAL.cxx b/lexers/LexMMIXAL.cxx index 0917b5d0a..49b639dd2 100644 --- a/lexers/LexMMIXAL.cxx +++ b/lexers/LexMMIXAL.cxx @@ -99,12 +99,11 @@ static void ColouriseMMIXALDoc(Sci_PositionU startPos, Sci_Position length, int } } else if (sc.state == SCE_MMIXAL_REF) { // REF if (!IsAWordChar(sc.ch) ) { - char s[100]; - sc.GetCurrent(s, sizeof(s)); + char s0[100]; + sc.GetCurrent(s0, sizeof(s0)); + const char *s = s0; if (*s == ':') { // ignore base prefix for match - for (size_t i = 0; i != sizeof(s); ++i) { - *(s+i) = *(s+i+1); - } + ++s; } if (special_register.InList(s)) { sc.ChangeState(SCE_MMIXAL_REGISTER); |
