Skip to content

Commit 213b148

Browse files
committed
Prevent a crash whenever readLEB128 is passed a nullptr
1 parent 0a35657 commit 213b148

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

view/sharedcache/core/Utility.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ int64_t readSLEB128(const uint8_t*& current, const uint8_t* end)
3939

4040
uint64_t readLEB128(const uint8_t*& current, const uint8_t* end)
4141
{
42+
if (current == nullptr)
43+
return -1;
44+
4245
uint64_t result = 0;
4346
int bit = 0;
4447
do

0 commit comments

Comments
 (0)