Skip to content

Commit 020d86a

Browse files
povikmarcan
authored andcommitted
m1n1.utils: Fix len() overflow in RangeMap
This is to fix OverflowError: Python int too large to convert to C ssize_t in case the upper bound of a range is 1<<64. Signed-off-by: Martin Povišer <[email protected]>
1 parent 7db6917 commit 020d86a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

proxyclient/m1n1/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ def items(self):
519519

520520
def _overlap_range(self, zone, split=False):
521521
zone = self.__zone(zone)
522-
if len(zone) == 0:
522+
if not zone:
523523
return 0, 0
524524

525525
start = bisect.bisect_left(self.__end, zone.start)

0 commit comments

Comments
 (0)