[PATCH] Avoid overlapping addresses to stpcpy calls in nscd (BZ #16760)
Siddhesh Poyarekar
siddhesh@redhat.com
Fri Mar 28 02:13:00 GMT 2014
On Thu, Mar 27, 2014 at 08:22:54PM +0100, Ondřej Bílka wrote:
> > > Fix this by using memmove instead of stpcpy. Tested x86_64 using
> > > various combinations of triplets (including NULL and non-NULL ones) to
> > > verify that this works correctly and there are no regressions.
> >
> This could work only with additional assertion that we do not move host
> forward otherwise it could overwrite user.
If the host, user and domain are out of order, they are copied in
order into a separate area in the buffer before the memmove. If you
think there's something else that could move host forward then I don't
understand and you'll have to elaborate a bit.
Siddhesh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140328/78f6d9ff/attachment.sig>
More information about the Libc-alpha
mailing list