Re: [SSSD] [PATCH] SYSDB: NULL-terminate the output of sysdb_get_{ranges, subdomains}

2012-09-10 Thread Jakub Hrozek
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 >

Re: [SSSD] [PATCH] SYSDB: NULL-terminate the output of sysdb_get_{ranges, subdomains}

2012-09-10 Thread Pavel Březina
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

Re: [SSSD] [PATCH] SYSDB: NULL-terminate the output of sysdb_get_{ranges, subdomains}

2012-09-10 Thread Jakub Hrozek
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 th

Re: [SSSD] [PATCH] SYSDB: NULL-terminate the output of sysdb_get_{ranges, subdomains}

2012-09-10 Thread Pavel Březina
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 :-) -

[SSSD] [PATCH] SYSDB: NULL-terminate the output of sysdb_get_{ranges, subdomains}

2012-09-09 Thread Jakub Hrozek
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. >From 3f3dadf53eee7984f6ef848557aec03b439c6260 Mon Sep 17 00:00:00 2001 From: J