Package: genisoimage
Version: 9:1.1.10-1
Severity: serious
Justification: will break Debian CD building
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch maverick

I noticed recently that jigdo downloads of Ubuntu CDs were always
falsely claiming a corrupted checksum (that is, downloading with rsync
instead had no effect, and the actual checksum matched that shown in hex
in the .jigdo file).  I finally got round to investigating.

A .template file built with cdrkit 1.1.6 ended like this, for an md5sum
of 01f72c846845e4e19aec8a45912e5dda:

  002753c0  00 a0 06 2a 00 00 01 f7  2c 84 68 45 e4 e1 9a ec  |...*....,.hE....|
  002753d0  8a 45 91 2e 5d da 00 04  00 00 95 c1 00 00 00 00  |.E..]...........|

A .template file built with cdrkit 1.1.10 ended like this, for an md5sum
of e52a8467ec8a3a8584dd78f6f51bdd03:

  0026c5f0  04 00 00 00 05 00 48 3f  27 00 00 65 35 32 61 38  |......H?'..e52a8|
  0026c600  34 36 37 65 63 38 61 33  61 38 35 00 04 00 00 dc  |467ec8a3a85.....|
  0026c610  bc 00 00 00 00                                    |.....|

So the md5sum has been incorrectly ASCII-encoded, and thus truncated.
Not good!  I suggest the following patch (though I have only compiled it
so far, not actually tested it; that's in progress).

  * Use checksum_copy rather than checksum_hex when building the final jigdo
    template DESC entry.

--- cdrkit-1.1.10.orig/genisoimage/jte.c
+++ cdrkit-1.1.10/genisoimage/jte.c
@@ -753,7 +753,7 @@
 
     jimage.type = 5;
     write_le48(image_len, &jimage.imageLen[0]);
-    memcpy(jimage.imageMD5, checksum_hex(iso_context, CHECK_MD5), 
sizeof(jimage.imageMD5));
+    checksum_copy(jimage.imageMD5, iso_context, CHECK_MD5);
     write_le32(MIN_JIGDO_FILE_SIZE, &jimage.blockLen[0]);
     template_fwrite(&jimage, sizeof(jimage), 1, t_file);    
     template_fwrite(out_len, sizeof(out_len), 1, t_file);

Thanks,

-- 
Colin Watson                                       [cjwat...@ubuntu.com]



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to