Issue Details (XML | Word | Printable)

Key: DERBY-2935
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Knut Anders Hatlen
Reporter: Knut Anders Hatlen
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Derby

DDMReader.readLengthAndCodePoint() decodes long integer incorrectly

Created: 13/Jul/07 09:35 AM   Updated: 30/Apr/08 01:15 AM
Return to search
Component/s: Network Server
Affects Version/s: 10.1.3.1, 10.2.2.0, 10.3.1.4, 10.4.1.3
Fix Version/s: 10.3.3.0, 10.4.1.3

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works decode-long.diff 2007-07-13 09:37 AM Knut Anders Hatlen 2 kB
File Licensed for inclusion in ASF works test.diff 2007-07-16 08:45 AM Knut Anders Hatlen 2 kB

Resolution Date: 19/Jul/07 07:50 AM


 Description  « Hide
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.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #557513 Thu Jul 19 07:49:57 UTC 2007 kahatlen DERBY-2935: DDMReader.readLengthAndCodePoint() decodes long integer incorrectly

Use long arithmetic instead of int arithmetic.
Files Changed
MODIFY /db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMReader.java

Repository Revision Date User Message
ASF #652211 Wed Apr 30 01:15:22 UTC 2008 kmarsden DERBY-2935 DDMReader.readLengthAndCodePoint() decodes long integer incorrectly

Contributed by Knut Anders Hatlen

port from trunk revision 557513
Files Changed
MODIFY /db/derby/code/branches/10.3/java/drda/org/apache/derby/impl/drda/DDMReader.java