Commit 5ce9f236 authored by Jeremy Hylton's avatar Jeremy Hylton

Use longs to guard against overflow.

Reported by Sidnei da Silva.
parent 1fb68a9e
...@@ -77,7 +77,7 @@ class FileStorageFormatter: ...@@ -77,7 +77,7 @@ class FileStorageFormatter:
# subclasses must provide _file # subclasses must provide _file
_metadata_size = 4 _metadata_size = 4L
_format_version = "21" _format_version = "21"
def _read_num(self, pos): def _read_num(self, pos):
...@@ -464,7 +464,7 @@ class GC(FileStorageFormatter): ...@@ -464,7 +464,7 @@ class GC(FileStorageFormatter):
del self.oid2curpos del self.oid2curpos
def buildPackIndex(self): def buildPackIndex(self):
pos = 4 pos = 4L
while pos < self.eof: while pos < self.eof:
th = self._read_txn_header(pos) th = self._read_txn_header(pos)
if th.tid > self.packtime: if th.tid > self.packtime:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment