On Mon, Aug 10, 2009 at 11:27 AM, erik quanstrom<[email protected]> wrote:
>> but should say (untested)
>
> s/un(tested)/\1
>
>> No one noticed before because most 9P2000 servers
>> assume they are being used correctly and implement
>> a simpler check: if offset == 0, seek to beginning,
>> otherwise continue where the last read left off.
>
> ken fs does so i'm still a bit puzzled.

Not the code I'm looking at
(/sys/src/cmd/cwfs/9p2.c)

        start += n;
        if(start < offset)
                continue;
        if(count < n){
                putbuf(p1);
                goto out1;
        }

There's no check that you get
to start == offset before copying data in.
So if you passed in an offset that was
off by a few bytes, it would get rounded
to a real directory entry boundary.

Russ

Reply via email to