Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4696F9263 for ; Wed, 23 May 2012 19:49:43 +0000 (UTC) Received: (qmail 34646 invoked by uid 500); 23 May 2012 19:49:41 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 34574 invoked by uid 500); 23 May 2012 19:49:41 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 34297 invoked by uid 99); 23 May 2012 19:49:41 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 May 2012 19:49:41 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 80F4114282A for ; Wed, 23 May 2012 19:49:41 +0000 (UTC) Date: Wed, 23 May 2012 19:49:41 +0000 (UTC) From: "Simon Willnauer (JIRA)" To: dev@lucene.apache.org Message-ID: <206568405.12835.1337802581531.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1421606038.12019.1337788481451.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Resolved] (LUCENE-4074) FST Sorter BufferSize causes int overflow if BufferSize > 2048MB 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/LUCENE-4074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Simon Willnauer resolved LUCENE-4074. ------------------------------------- Resolution: Fixed committed to trunk and 3.6 branch > FST Sorter BufferSize causes int overflow if BufferSize > 2048MB > ---------------------------------------------------------------- > > Key: LUCENE-4074 > URL: https://issues.apache.org/jira/browse/LUCENE-4074 > Project: Lucene - Java > Issue Type: Bug > Components: modules/spellchecker > Affects Versions: 3.6, 4.0 > Reporter: Simon Willnauer > Assignee: Simon Willnauer > Fix For: 4.0, 3.6.1 > > Attachments: LUCENE-4074.patch > > > the BufferSize constructor accepts size in MB as an integer and uses multiplication to convert to bytes. While its checking the size in bytes to be less than 2048 MB it does that after byte conversion. If you pass a value > 2047 to the ctor the value overflows since all constants and methods based on MB expect 32 bit signed ints. This does not even result in an exception until the BufferSize is actually passed to the sorter. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org