Bug fix. Error on 0 offset copies.
PiperOrigin-RevId: 342447553
This commit is contained in:
committed by
Victor Costan
parent
289c8a3c0a
commit
719bed0ae2
@@ -892,6 +892,8 @@ std::pair<const uint8_t*, char*> DecompressBranchless(
|
|||||||
// always succeed for literals.
|
// always succeed for literals.
|
||||||
if (SNAPPY_PREDICT_FALSE(offset < len)) {
|
if (SNAPPY_PREDICT_FALSE(offset < len)) {
|
||||||
assert(tag_type != 0);
|
assert(tag_type != 0);
|
||||||
|
// offset 0 is an error.
|
||||||
|
if (SNAPPY_PREDICT_FALSE(offset == 0)) break;
|
||||||
op = IncrementalCopy(op_base + delta, op_base + op, op_base + op + len,
|
op = IncrementalCopy(op_base + delta, op_base + op, op_base + op + len,
|
||||||
op_base + op_limit) -
|
op_base + op_limit) -
|
||||||
op_base;
|
op_base;
|
||||||
|
|||||||
Reference in New Issue
Block a user