inkscape/inkscape-20090508svn-crc32.patch
2009-05-18 04:22:36 +00:00

21 lines
652 B
Diff

CRC-32 for 64-bit systems is calculated incorrectly,
resulting in corrupted ODG exported files.
https://bugs.launchpad.net/inkscape/+bug/275519
https://bugzilla.redhat.com/show_bug.cgi?id=499088
Lubomir Rintel
diff -up inkscape/src/dom/util/ziptool.cpp.crc32 inkscape/src/dom/util/ziptool.cpp
--- inkscape/src/dom/util/ziptool.cpp.crc32 2009-05-18 06:12:56.000000000 +0200
+++ inkscape/src/dom/util/ziptool.cpp 2009-05-18 06:13:31.000000000 +0200
@@ -158,6 +158,8 @@ void Crc32::reset()
void Crc32::update(unsigned char b)
{
unsigned long c = ~value;
+
+ c &= 0xffffffff;
c = crc_table[(c ^ b) & 0xff] ^ (c >> 8);
value = ~c;
}