Fatal bug in gzip.py

Andreas Jung ajung at sz-sb.de
Sat May 29 05:48:28 EDT 1999


The following lines produce a fatal fault in the gzip module:

import gzip

fp = gzip.GzipFile('common.add.hist___.1999104.gz','r')
lines = fp.readlines()
fp.close()

bonnie@/tmp(14)% python t.py
Traceback (innermost last):
  File "t.py", line 4, in ?
    lines = fp.readlines()
  File "/ojs/home/ojs/tools/python/lib/python1.5/gzip.py", line 280, in readline
s
    buf = self.read()
  File "/ojs/home/ojs/tools/python/lib/python1.5/gzip.py", line 151, in read
    readsize = readsize * 2
OverflowError: integer multiplication

We're using the gzip module sind some month for reading and writing
gzipped files. The problem occurs with Python 1.5.2 under Solaris
2.6. However works with a Python 1.5.1 installation on the same maschine.

Cheers,
Andreas






More information about the Python-list mailing list