diff options
Diffstat (limited to 'table/block.cc')
-rw-r--r-- | table/block.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/table/block.cc b/table/block.cc index 0525d2d..92b2877 100644 --- a/table/block.cc +++ b/table/block.cc @@ -62,7 +62,9 @@ static inline const char* DecodeEntry(const char* p, const char* limit, if ((p = GetVarint32Ptr(p, limit, value_length)) == NULL) return NULL; } - if (limit - p < (*non_shared + *value_length)) return NULL; + if (static_cast<uint32>(limit - p) < (*non_shared + *value_length)) { + return NULL; + } return p; } |