summaryrefslogtreecommitdiff
path: root/view
diff options
context:
space:
mode:
author0cyn <kat@vector35.com>2026-03-31 07:33:16 -0400
committer0cyn <kat@vector35.com>2026-03-31 07:33:16 -0400
commit213b1487db828d26aa2f60d9fb2d7f990d9fd43b (patch)
treec16d601779707ddb1b5a3264f52cfa97628d2664 /view
parent0a356578e65cf54c5b654b59a509c2ebe29ab54b (diff)
Prevent a crash whenever readLEB128 is passed a nullptr
Diffstat (limited to 'view')
-rw-r--r--view/sharedcache/core/Utility.cpp3
1 files changed, 3 insertions, 0 deletions
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