[SSSD] [PATCH] SYSDB: NULL-terminate the output of sysdb_get_{ranges, subdomains}
Jakub Hrozek
jhrozek at redhat.com
Mon Sep 10 08:33:02 UTC 2012
On Mon, Sep 10, 2012 at 10:26:57AM +0200, Pavel Březina wrote:
> On 09/10/2012 10:22 AM, Jakub Hrozek wrote:
> >On Mon, Sep 10, 2012 at 09:19:49AM +0200, Pavel Březina wrote:
> >>On 09/09/2012 09:31 PM, Jakub Hrozek wrote:
> >>>I noticed (using valgrind) that the sysdb tests access memory outside
> >>>the array allocated as a result of the functions in subject. The attached
> >>>patch NULL-terminates the array so that it's safe to loop over the results.
> >>
> >>Nack. Just a nitpick :-)
> >>
> >>>- list = talloc_zero_array(tmp_ctx, struct range_info *, res->count);
> >>>+ list = talloc_zero_array(tmp_ctx, struct range_info *, res->count+1);
> >>
> >>Can you add spaces around + please? They are present in the other
> >>function.
> >>
> >>Thanks,
> >>Pavel.
> >
> >Sure, attached.
>
> Ack.
Pushed to master.
More information about the sssd-devel
mailing list