← Back to team overview

registry team mailing list archive

[Bug 690375] [NEW] Python 2.7: table checkSum writing "struct.error: integer out of range for 'L' format code"

 

Public bug reported:

Binary package hint: fonttools

The checksum writing code does not bound to the range 0..0xffffffff
needed for sstruct in Pythong 2.7, resulting int trying to write (32-bit
hex values such as) -685515063 for the 'checkSum' field:

  File "/usr/lib/pymodules/python2.7/FontTools/fontTools/ttLib/__init__.py", line 203, in save
    writer.close()
  File "/usr/lib/pymodules/python2.7/FontTools/fontTools/ttLib/sfnt.py", line 153, in close
    directory = directory + entry.toString()
  File "/usr/lib/pymodules/python2.7/FontTools/fontTools/ttLib/sfnt.py", line 224, in toString
    return sstruct.pack(sfntDirectoryEntryFormat, self)
  File "/usr/lib/pymodules/python2.7/FontTools/sstruct.py", line 79, in pack
    data = apply(struct.pack, (formatstring,) + tuple(elements))

The solution is probably to use something like checksum ^ 0xffffffff
during preparation.

** Affects: fonttools (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: fonttools (Fedora)
     Importance: Unknown
         Status: Unknown

** Bug watch added: Red Hat Bugzilla #634055
   https://bugzilla.redhat.com/show_bug.cgi?id=634055

** Also affects: fonttools (Fedora) via
   https://bugzilla.redhat.com/show_bug.cgi?id=634055
   Importance: Unknown
       Status: Unknown

** Summary changed:

- Pythong 2.7: table checkSum writing "struct.error: integer out of range for 'L' format code"
+ Python 2.7: table checkSum writing "struct.error: integer out of range for 'L' format code"

-- 
You received this bug notification because you are a member of Registry
Administrators, which is the registrant for Fedora.
https://bugs.launchpad.net/bugs/690375

Title:
  Python 2.7: table checkSum writing "struct.error: integer out of range for 'L' format code"



Follow ups

References