From 213b1487db828d26aa2f60d9fb2d7f990d9fd43b Mon Sep 17 00:00:00 2001 From: 0cyn Date: Tue, 31 Mar 2026 07:33:16 -0400 Subject: Prevent a crash whenever readLEB128 is passed a nullptr --- view/sharedcache/core/Utility.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'view/sharedcache/core/Utility.cpp') diff --git a/view/sharedcache/core/Utility.cpp b/view/sharedcache/core/Utility.cpp index 515d62c7..591bcba5 100644 --- a/view/sharedcache/core/Utility.cpp +++ b/view/sharedcache/core/Utility.cpp @@ -39,6 +39,9 @@ int64_t readSLEB128(const uint8_t*& current, const uint8_t* end) uint64_t readLEB128(const uint8_t*& current, const uint8_t* end) { + if (current == nullptr) + return -1; + uint64_t result = 0; int bit = 0; do -- cgit v1.3.1