Fix a out of bound buffer access in ParsingUtils GetNextLine (#6134)

This commit is contained in:
Qingyou Zhao
2025-05-05 22:48:09 -07:00
committed by GitHub
parent d1b73dffec
commit 0dafa03ff8

View File

@@ -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++;
}