bug-hurd
[Top][All Lists]
Advanced

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

Re: gunzip store trouble identified


From: Marcus Brinkmann
Subject: Re: gunzip store trouble identified
Date: Thu, 14 Mar 2002 00:24:14 +0100
User-agent: Mutt/1.3.27i

On Mon, Mar 11, 2002 at 06:09:16PM -0500, Roland McGrath wrote:
> > Because in this case store_next_run is called, and store_next_run wraps
> > around, this will succeed.
> 
> That should not happen.  It should not be wrapping around at all for most
> stores.  I suspect that what's needed is an end-of-store check in
> store_next_run, or perhaps better yet in store_read/store_write.  This is
> another case where the code was written to assume no calls off the end of
> the store.  For store_write, it should just have a check for trying to
> write past the end of the store and return EINVAL or EIO or something at
> the start.

The interface seems to me to be intended to support partial writes (actual
amount written returned in AMOUNT).  Shouldn't it truncate?

> For store_read, it should cap the the addr+amount to the store
> size when it's known.

Yes, I am following you.

> > Now, store_read returns 256kb, and that wretches things in zread badly.
> 
> Even with store_read fixed, it looks to me that zread has a bug.

I will fix it along with the other.

Thanks,
Marcus

-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann              GNU    http://www.gnu.org    marcus@gnu.org
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de



reply via email to

[Prev in Thread] Current Thread [Next in Thread]