From 30fd4514dca00790b51ca7ce15a829cba15bbf4c Mon Sep 17 00:00:00 2001 From: Rangi Date: Tue, 7 Jul 2026 16:39:02 -0400 Subject: [PATCH] Add fail-safe for invalid RPN commands in bad object files --- src/link/patch.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/link/patch.cpp b/src/link/patch.cpp index 9fd66e32..bc58af53 100644 --- a/src/link/patch.cpp +++ b/src/link/patch.cpp @@ -456,6 +456,11 @@ static int32_t computeRPNExpr(Patch const &patch, std::vector const &fil } break; } + + // LCOV_EXCL_START + default: + fatalAt(patch, "Invalid RPN command $%02x", static_cast(command)); + // LCOV_EXCL_STOP } pushRPN(value, isError);