From derby-dev-return-46612-apmail-db-derby-dev-archive=db.apache.org@db.apache.org Fri Jul 13 09:39:37 2007 Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 90863 invoked from network); 13 Jul 2007 09:39:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Jul 2007 09:39:30 -0000 Received: (qmail 5366 invoked by uid 500); 13 Jul 2007 09:39:28 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 5262 invoked by uid 500); 13 Jul 2007 09:39:28 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 5242 invoked by uid 99); 13 Jul 2007 09:39:28 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jul 2007 02:39:28 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jul 2007 02:39:25 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id BC6BB71420F for ; Fri, 13 Jul 2007 02:39:04 -0700 (PDT) Message-ID: <12095130.1184319544768.JavaMail.jira@brutus> Date: Fri, 13 Jul 2007 02:39:04 -0700 (PDT) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-2935) DDMReader.readLengthAndCodePoint() decodes long integer incorrectly In-Reply-To: <1633569.1184319304448.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-2935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-2935: -------------------------------------- Attachment: decode-long.diff The attached patch fixes the decoding by forcing promotion of the operands to long. The regression tests ran cleanly. > DDMReader.readLengthAndCodePoint() decodes long integer incorrectly > ------------------------------------------------------------------- > > Key: DERBY-2935 > URL: https://issues.apache.org/jira/browse/DERBY-2935 > Project: Derby > Issue Type: Bug > Components: Network Server > Affects Versions: 10.1.3.1, 10.2.2.0, 10.3.1.1, 10.4.0.0 > Reporter: Knut Anders Hatlen > Priority: Minor > Attachments: decode-long.diff > > > DDMReader.readLengthAndCodePoint() contains code to decode a long integer from a byte array. This code is broken since it uses int operations and not long operations in the decoding. The long might be encoded using four, six or eight bytes, and since Derby currently always uses the four bytes encoding, the bug is not exposed in the current code. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.