Fix out-of-bounds buffer read in Scintilla MMIXAL lexer
Fix off-by-1 error in the loop condition. Apply our own minimal fix because Upstream is aware of the bug (see https://sourceforge.net/p/scintilla/bugs/2019/) but refuses to fix it there. Closes #18440.
This commit is contained in:
@@ -103,7 +103,7 @@ static void ColouriseMMIXALDoc(Sci_PositionU startPos, Sci_Position length, int
|
||||
char s[100];
|
||||
sc.GetCurrent(s, sizeof(s));
|
||||
if (*s == ':') { // ignore base prefix for match
|
||||
for (size_t i = 0; i != sizeof(s); ++i) {
|
||||
for (size_t i = 0; i != sizeof(s)-1; ++i) {
|
||||
*(s+i) = *(s+i+1);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user