Return-Path: X-Original-To: apmail-accumulo-notifications-archive@minotaur.apache.org Delivered-To: apmail-accumulo-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E10FF17BDC for ; Fri, 10 Oct 2014 18:28:35 +0000 (UTC) Received: (qmail 55751 invoked by uid 500); 10 Oct 2014 18:28:35 -0000 Delivered-To: apmail-accumulo-notifications-archive@accumulo.apache.org Received: (qmail 55712 invoked by uid 500); 10 Oct 2014 18:28:35 -0000 Mailing-List: contact notifications-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@apache.org Delivered-To: mailing list notifications@accumulo.apache.org Received: (qmail 55527 invoked by uid 99); 10 Oct 2014 18:28:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Oct 2014 18:28:34 +0000 Date: Fri, 10 Oct 2014 18:28:34 +0000 (UTC) From: "Josh Elser (JIRA)" To: notifications@accumulo.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (ACCUMULO-3220) Division by zero if encryption cipher isn't a block cipher MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ACCUMULO-3220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Josh Elser resolved ACCUMULO-3220. ---------------------------------- Resolution: Fixed > Division by zero if encryption cipher isn't a block cipher > ---------------------------------------------------------- > > Key: ACCUMULO-3220 > URL: https://issues.apache.org/jira/browse/ACCUMULO-3220 > Project: Accumulo > Issue Type: Sub-task > Affects Versions: 1.6.0, 1.6.1 > Reporter: Josh Elser > Assignee: Josh Elser > Priority: Minor > Labels: coverity > Fix For: 1.6.2, 1.7.0 > > Time Spent: 40m > Remaining Estimate: 0h > > {code:title=BlockedOutputStream.java} > public BlockedOutputStream(OutputStream out, int blockSize, int bufferSize) { > if (bufferSize <= 0) > throw new IllegalArgumentException("bufferSize must be greater than 0."); > if (out instanceof DataOutputStream) > this.out = (DataOutputStream) out; > else > this.out = new DataOutputStream(out); > this.blockSize = blockSize; > int remainder = bufferSize % blockSize; > if (remainder != 0) > remainder = blockSize - remainder; > // some buffer space + bytes to make the buffer evened up with the cipher block size - 4 bytes for the size int > bb = ByteBuffer.allocate(bufferSize + remainder - 4); > } > {code} > If the Cipher is not a block cipher, blocksize is zero and would result in a division by zero error. -- This message was sent by Atlassian JIRA (v6.3.4#6332)