Fix a out of bound buffer access in ParsingUtils GetNextLine (#6134)
This commit is contained in:
@@ -161,7 +161,7 @@ AI_FORCE_INLINE bool GetNextLine(const char_t *&buffer, char_t out[BufferSize])
|
||||
}
|
||||
|
||||
char *_out = out;
|
||||
char *const end = _out + BufferSize;
|
||||
char *const end = _out + BufferSize - 1;
|
||||
while (!IsLineEnd(*buffer) && _out < end) {
|
||||
*_out++ = *buffer++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user