File CVE-2025-2151.patch of Package assimp

From d2c6e64a1122884570caf4aaa589d810f5351f28 Mon Sep 17 00:00:00 2001
From: Kim Kulling <kimkulling@users.noreply.github.com>
Date: Thu, 13 Mar 2025 10:17:43 +0100
Subject: [PATCH] Fix: Avoid override in line parsing (#6048)

* Fix: Avoid override in line parsing

- closes https://github.com/assimp/assimp/issues/6026

* Update ParsingUtils.h
---
 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 f5908ee24..9882cf114 100644
--- a/include/assimp/ParsingUtils.h
+++ b/include/assimp/ParsingUtils.h
@@ -167,7 +167,7 @@ AI_FORCE_INLINE bool GetNextLine(const char_t *&buffer, char_t out[BufferSize])
     }
     *_out = (char_t)'\0';
 
-    while (IsLineEnd(*buffer) && '\0' != *buffer) {
+    while (IsLineEnd(*buffer) && '\0' != *buffer && buffer != end) {
         ++buffer;
     }
 
-- 
2.48.1

openSUSE Build Service is sponsored by