impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Hecht (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-5172: Buffer overrun for Snappy decompression
Date Thu, 13 Apr 2017 23:35:21 GMT
Dan Hecht has submitted this change and it was merged.

Change subject: IMPALA-5172: Buffer overrun for Snappy decompression

IMPALA-5172: Buffer overrun for Snappy decompression

When using a preallocated buffer for decompression, a
file corruption can lead to the expected decompressed size
being smaller than the actual decompressed size. Since
we use this for allocating the output buffer,
decompression needs to be able to handle a buffer that
is too small.

Snappy does not properly handle a buffer that is too small
and will overrun the buffer. This changes the code to
check the decompressed length and return an error if
the buffer is not large enough. It also adds a test to
verify that this behavior is respected for other
compression algorithms.

Change-Id: I45b75f61e8c0ae85f9add5b13ac2b161a803d2ba
Reviewed-by: Dan Hecht <>
Tested-by: Dan Hecht <>
M be/src/util/
M be/src/util/
2 files changed, 57 insertions(+), 3 deletions(-)

  Dan Hecht: Looks good to me, approved; Verified

To view, visit
To unsubscribe, visit

Gerrit-MessageType: merged
Gerrit-Change-Id: I45b75f61e8c0ae85f9add5b13ac2b161a803d2ba
Gerrit-PatchSet: 5
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Joe McDonnell <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: Joe McDonnell <>
Gerrit-Reviewer: Sailesh Mukil <>

View raw message