[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Negative filesize on DVDs



On Wed, Aug 31, 2005 at 09:39:42AM +0200, Alf Schlichting wrote:
> Description:
> 	Trying to read from a DVD containing a file > 2Gb shows negative
> 	filesize:
> 
> $ ls -l /cdrom 
> total 4291868104
> dr-xr-xr-x  8 root  wheel                  4096 Aug 27 22:42 somedir/
> -r-xr-xr-x  1 root  wheel             288950743 Aug 19 16:51 normal_file
> -r--r--r--  1 root  wheel           -1875740642 Jul 18 16:50 big_file
> $
> 
> 	As a result the file can not be read/copied etc.
> 
> 	This DVD was burned with mkhybrid/dvd+rw-tools-5.21.4.10.8 ala FAQ.
> 	It can be read under Linux. I copied it under Linux, burned it from
> 	there (K3b), mounting it under OpenBSD shows the same results so 
> 	i doubt it was influenced by stupid use of the mkhybrid/growisofs
> 	options.
> 
> 	Alf
> 
> Linux:	
> total 2644709
> dr-xr-xr-x  8 alf users       4096 2005-08-27 22:42 somedir/
> -r-xr-xr-x  1 alf users  288950743 2005-08-19 16:51 normal_file
> -r--r--r--  1 alf users 2419226654 2005-07-18 16:50 big_file

Can you please try this diff?

-p.

Index: cd9660_vfsops.c
===================================================================
RCS file: /cvs/src/sys/isofs/cd9660/cd9660_vfsops.c,v
retrieving revision 1.35
diff -u -r1.35 cd9660_vfsops.c
--- cd9660_vfsops.c	14 Aug 2003 07:46:39 -0000	1.35
+++ cd9660_vfsops.c	5 Nov 2005 17:33:15 -0000
@@ -855,7 +855,7 @@
 	}
 
 	ip->iso_extent = isonum_733(isodir->extent);
-	ip->i_size = isonum_733(isodir->size);
+	ip->i_size = (u_int32_t) isonum_733(isodir->size);
 	ip->iso_start = isonum_711(isodir->ext_attr_length) + ip->iso_extent;
 	
 	/*



Visit your host, monkey.org