diff options
| author | mitchell <unknown> | 2020-06-17 18:03:50 -0400 |
|---|---|---|
| committer | mitchell <unknown> | 2020-06-17 18:03:50 -0400 |
| commit | 3ff417bf5e9a53af3d1a037e09de5a5a8536d77c (patch) | |
| tree | 16a9fe77cfba3622d17947a833775e838320d50d | |
| parent | 69e4730b3129836b91337884c8139cddee25f21f (diff) | |
| download | scintilla-mirror-3ff417bf5e9a53af3d1a037e09de5a5a8536d77c.tar.gz | |
Backport: Bug [#2019]. Fix buffer over-read with absolute reference.
Backport of changeset 8212:6d0ce3c92a13, but without lexilla tests.
| -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); |
