Project

Profile

Help

Bug #5447

closed

Failure in bin:pack-integer with little-endian negative integer

Added by Michael Kay about 2 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
EXSLT extensions
Sprint/Milestone:
-
Start date:
2022-04-04
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
10, 11, trunk
Fix Committed on Branch:
10, 11, trunk
Fixed in Maintenance Release:
Platforms:

Description

At line 1100, in method packBytes (called by pack-integer), is the loop

               while (length > 0)
                    result[i++] = (byte) (255);

which is clearly wrong because the condition doesn't change within the loop.

It's possible that this code is unreachable; more likely, it's not reached by any of our test cases. We have relatively few tests for bin:pack-integer on negative numbers, but it's a complicated path.

Please register to edit this issue

Also available in: Atom PDF