[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pwrite module
From: |
Peter O'Gorman |
Subject: |
Re: pwrite module |
Date: |
Mon, 10 May 2010 18:30:38 -0500 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
On Tue, May 11, 2010 at 12:57:20AM +0200, Bruno Haible wrote:
> Hi Peter,
>
> > Attached. Also noticed that I declare read_buf, but never use it
>
> Thanks, I applied it, only fixing up the ChangeLog entries (wrong file names).
Oh, bah! Thank you!
>
> > (good job, really, as it's one byte too short).
>
> Huh? No, it had the right size. When you call read() with argument N, the
> buffer has to be N bytes large, not N+1.
Yes, the read is ok, but the strcmp would have read past the end of the
buffer, looking for a NULL that I'd never put there.
Doesn't matter though, since I never used read_buf anyway :)
Peter
--
Peter O'Gorman
address@hidden
Re: pwrite module, Simon Josefsson, 2010/05/18