From 0dafa03ff8523c386b484d342edf7dca01857c56 Mon Sep 17 00:00:00 2001 From: Qingyou Zhao Date: Mon, 5 May 2025 22:48:09 -0700 Subject: [PATCH] Fix a out of bound buffer access in ParsingUtils GetNextLine (#6134) --- include/assimp/ParsingUtils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/assimp/ParsingUtils.h b/include/assimp/ParsingUtils.h index 9882cf114..26fb03e70 100644 --- a/include/assimp/ParsingUtils.h +++ b/include/assimp/ParsingUtils.h @@ -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++; }