[SSSD] [PATCH] NSS: Add sss_readrep_copy_string
Jan Zelený
jzeleny at redhat.com
Wed Jan 18 08:05:07 UTC 2012
> On Wed, 2012-01-11 at 14:14 +0100, Jan Zelený wrote:
> > > There were many places in the client code where we were
> > > duplicating a loop to copy data in from the response buffer. This
> > > patch turns those loops into a function for easier maintenance and
> > > easier-to-read *readrep() routines.
> > >
> > > The netgroup code required the addition of a "temp" string while doing
> > > the copying, since the netgroup struct requires a (const char *) and
> > > the buffer manipulation was done using (char *).
> > >
> > > This patch follows "[PATCH] NSS: Validate input string lengths" in my
> > > tree but will apply without it.
> >
> > Just one thing, in nss_netgroup.c I think you might want to use the last
> > argument of sss_readrep_copy_string() instead of testing strlen()
> > afterwards. Other than that the patch should be ok, but I did only
> > visual review, no actual testing.
>
> Good idea. New patch attached.
Ack
Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120118/0931abff/attachment.sig>
More information about the sssd-devel
mailing list