AeThex-Engine-Core/engine/thirdparty/thorvg/patches/0002-use-heap-alloc.patch
MrPiglr 9dddce666d
🚀 AeThex Engine v1.0 - Complete Fork
- Forked from Godot Engine 4.7-dev (MIT License)
- Rebranded to AeThex Engine with cyan/purple theme
- Added AI-powered development assistant module
- Integrated Claude API for code completion & error fixing
- Custom hexagon logo and branding
- Multi-platform CI/CD (Windows, Linux, macOS)
- Built Linux editor binary (151MB)
- Complete source code with all customizations

Tech Stack:
- C++ game engine core
- AI Module: Claude 3.5 Sonnet integration
- Build: SCons, 14K+ source files
- License: MIT (Godot) + Custom (AeThex features)

Ready for Windows build via GitHub Actions!
2026-02-23 05:01:56 +00:00

44 lines
1.5 KiB
Diff

diff --git a/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp b/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp
index 81d5c098a2..4c0a0f53db 100644
--- a/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp
+++ b/thirdparty/thorvg/src/loaders/svg/tvgXmlParser.cpp
@@ -475,11 +475,14 @@ bool simpleXmlParseW3CAttribute(const char* buf, unsigned bufLength, simpleXMLAt
if (!buf) return false;
end = buf + bufLength;
- key = (char*)alloca(end - buf + 1);
- val = (char*)alloca(end - buf + 1);
if (buf == end) return true;
+ char* key_buf = (char*)malloc(end - buf + 1);
+ char* val_buf = (char*)malloc(end - buf + 1);
+
+ key = key_buf;
+ val = val_buf;
do {
char* sep = (char*)strchr(buf, ':');
next = (char*)strchr(buf, ';');
@@ -487,7 +490,11 @@ bool simpleXmlParseW3CAttribute(const char* buf, unsigned bufLength, simpleXMLAt
if (auto src = strstr(buf, "src")) {//src tag from css font-face contains extra semicolon
if (src < sep) {
if (next + 1 < end) next = (char*)strchr(next + 1, ';');
- else return true;
+ else {
+ free(key_buf);
+ free(val_buf);
+ return true;
+ }
}
}
@@ -534,6 +541,9 @@ bool simpleXmlParseW3CAttribute(const char* buf, unsigned bufLength, simpleXMLAt
buf = next + 1;
} while (true);
+ free(key_buf);
+ free(val_buf);
+
return true;
}