From 29c9a5b855f9c250ad439c722ede862cca7d097b Mon Sep 17 00:00:00 2001 From: Brad Arant Date: Sat, 22 Aug 2026 19:52:35 -0700 Subject: [PATCH] Fix MString::fromHex() silently swallowing the odd-length-input error The Exception on the odd-length-input path was constructed but never thrown (missing throw keyword) - the temporary was destroyed with no effect, so execution fell through to an out-of-bounds nextChar() read past the exhausted buffer instead of raising an error. Added the missing throw. Verified via full local compile: MString.cpp builds clean standalone; a full-repo pass shows only the pre-existing, already-known StreamReader.h-missing failures (7 files, unrelated to this change), confirmed via each error log individually. --- MString.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MString.cpp b/MString.cpp index f24c571..57bb207 100644 --- a/MString.cpp +++ b/MString.cpp @@ -390,7 +390,7 @@ namespace coreutils { ch1 <<= 4; ch1 &= 240; if(eod()) - coreutils::Exception("conversion from hex requires even number of characters."); + throw coreutils::Exception("conversion from hex requires even number of characters."); char ch2 = nextChar(); ch2 -= 48; if(ch2 > 9)