Subject: Re: kern/34688: cd(4) regression
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Michael van Elst <mlelstv@serpens.de>
List: netbsd-bugs
Date: 10/08/2006 07:35:03
The following reply was made to PR kern/34688; it has been noted by GNATS.

From: Michael van Elst <mlelstv@serpens.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/34688: cd(4) regression
Date: Sun, 8 Oct 2006 09:31:28 +0200

 Can you please try this patch?
 
 Index: cd.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/scsipi/cd.c,v
 retrieving revision 1.250
 diff -u -r1.250 cd.c
 --- cd.c	8 Sep 2006 00:33:18 -0000	1.250
 +++ cd.c	8 Oct 2006 07:27:14 -0000
 @@ -1711,7 +1711,9 @@
  			track_start = _4btol(ti.track_start);
  			track_size  = _4btol(ti.track_size);
  
 -			*size = track_start + track_size;
 +			/* overwrite only with a sane value */
 +			if (track_start + track_size >= 100)
 +				*size = track_start + track_size;
  		};
  	};
  
 -- 
                                 Michael van Elst
 Internet: mlelstv@serpens.de
                                 "A potential Snark may lurk in every tree."