From 3951df25be4580aa4b349547566ce5ed48b8385b Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Mon, 8 Feb 2010 13:04:56 +0100 Subject: [PATCH] Corrected a wrong constant with checksum indice of Iso_File_Src. It could have caused false checksum negatives in images with billions of files. --- libisofs/filesrc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libisofs/filesrc.c b/libisofs/filesrc.c index 0e097fe..e75dacd 100644 --- a/libisofs/filesrc.c +++ b/libisofs/filesrc.c @@ -138,11 +138,11 @@ int iso_file_src_create(Ecma119Image *img, IsoFile *file, IsoFileSrc **src) if ((img->md5_file_checksums & 1) && !no_md5) { img->checksum_idx_counter++; - if (img->checksum_idx_counter < 0x80000000) { + if (img->checksum_idx_counter < 0x7fffffff) { fsrc->checksum_index = img->checksum_idx_counter; } else { fsrc->checksum_index= 0; - img->checksum_idx_counter= 0x80000000; /* keep from rolling over */ + img->checksum_idx_counter= 0x7fffffff; /* keep from rolling over */ } cret = iso_file_set_isofscx(file, (*src)->checksum_index, 0); if (cret < 0)