Date: Sun, 29 Sep 2013 13:40:35 -0400 From: Rich Felker <dalias@...ifal.cx> To: musl@...ts.openwall.com Subject: Re: [PATCH] getgr_r: Reserve space for gr_mem's NULL terminator in buffer By the way, how did you come across the bugs you're reporting? Are you testing software against musl, or directly reviewing the source? I'm just curious since you've already found a couple important issues that our existing methodologies have so far missed, and I'm hoping we can stamp out a lot more bugs like this between now and the 1.0 release. Rich On Sat, Sep 28, 2013 at 11:08:46PM -0700, Michael Forney wrote: > Currently, the NULL terminator overlaps with the beginning of the line, causing > gr_name to always be the empty string. > --- > As an aside, I don't understand why 32 is added to the size check. It looks > like the length is rounded down to a multiple of 16, so at most 15 extra bytes > will be needed. But even so, wouldn't it be better to check for exactly the > amount of space that will be used? Or is it not worth the additional temporary > variable? > > src/passwd/getgr_r.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.