Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 29 Sep 2013 02:55:54 -0400
From: Rich Felker <>
Subject: Re: [PATCH] getgr_r: Reserve space for gr_mem's NULL
 terminator in buffer

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.

Thanks. Fix committed.

> ---
> 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?

I'd have to look back and see if there's any good reason; offhand, I
agree with your analysis.


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.