Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 616A9200C64 for ; Fri, 14 Apr 2017 01:14:18 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5FEA7160BA7; Thu, 13 Apr 2017 23:14:18 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A6FA4160B98 for ; Fri, 14 Apr 2017 01:14:17 +0200 (CEST) Received: (qmail 30691 invoked by uid 500); 13 Apr 2017 23:14:16 -0000 Mailing-List: contact reviews-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.incubator.apache.org Received: (qmail 30680 invoked by uid 99); 13 Apr 2017 23:14:16 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Apr 2017 23:14:16 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 3D9FC1A009C for ; Thu, 13 Apr 2017 23:14:16 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.363 X-Spam-Level: X-Spam-Status: No, score=0.363 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id phCpQ464YiwN for ; Thu, 13 Apr 2017 23:14:15 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id B987D5FAD8 for ; Thu, 13 Apr 2017 23:14:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id v3DNEDWl020739; Thu, 13 Apr 2017 23:14:13 GMT Message-Id: <201704132314.v3DNEDWl020739@ip-10-146-233-104.ec2.internal> Date: Thu, 13 Apr 2017 23:14:12 +0000 From: "Joe McDonnell (Code Review)" To: Dan Hecht , impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Sailesh Mukil Reply-To: joemcdonnell@cloudera.com X-Gerrit-MessageType: newpatchset Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-5172=3A_Buffer_overrun_for_Snappy_decompression=0A?= X-Gerrit-Change-Id: I45b75f61e8c0ae85f9add5b13ac2b161a803d2ba X-Gerrit-ChangeURL: X-Gerrit-Commit: f328504de722f0aa8bff9aff29b91fcde35d2611 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.12.7 archived-at: Thu, 13 Apr 2017 23:14:18 -0000 Hello Dan Hecht, I'd like you to reexamine a change. Please visit http://gerrit.cloudera.org:8080/6625 to look at the new patch set (#4). 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 --- M be/src/util/decompress-test.cc M be/src/util/decompress.cc 2 files changed, 57 insertions(+), 3 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/25/6625/4 -- To view, visit http://gerrit.cloudera.org:8080/6625 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I45b75f61e8c0ae85f9add5b13ac2b161a803d2ba Gerrit-PatchSet: 4 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Joe McDonnell Gerrit-Reviewer: Dan Hecht Gerrit-Reviewer: Joe McDonnell Gerrit-Reviewer: Sailesh Mukil