[Gluster-devel] glfs_readdir_r is painful

Anand Avati avati at gluster.org
Thu Oct 31 00:09:37 UTC 2013

On Wed, Oct 30, 2013 at 3:54 PM, Eric Blake <eblake at redhat.com> wrote:

> > Hmm, I don't think so.. strncpy of 255 bytes on to a buffer guaranteed to
> > be 256 or higher and also guaranteed to be 0-memset'ed cannot return an
> > invalid file name. No?
> The fact that your internal glfs_readdir buffer is memset means you are
> safe there for a 255-byte filename; but that safety does not extend to
> glfs_readdir_r for a user buffer.

Right! Fixed - http://review.gluster.org/#/c/6201/2<http://review.gluster.org/#/c/6201/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-devel/attachments/20131030/9fc12470/attachment-0001.html>

More information about the Gluster-devel mailing list