qsort_r() (was: Re: ldb and strict overflow)
abartlet at samba.org
Fri Mar 23 23:37:50 UTC 2018
On Thu, 2018-03-22 at 07:31 +0100, Andreas Schneider wrote:
> On Wednesday, 21 March 2018 22:54:02 CET Andrew Bartlett wrote:
> > On Wed, 2018-03-21 at 19:41 +0100, Andreas Schneider wrote:
> > > Attached is my current version. The ldb fixes don't work. I think this
> > > code
> > > needs unit tests and some rethinking. I need to dive into that tomorrow.
> > I wasn't able to find where the attempted ldb patches are, but I want
> > to mention that you should be sure to check out
> > http://git.catalyst.net.nz/gitweb?p=samba.git;a=shortlog;h=refs/heads/gary-l
> > mdb-merged
> Thanks, but I don't thing ldb_qsort is covered :-)
> I'm talking about this code:
> The patch is HACKISH and I need to write unit tests first and then fix it.
Could we abandon it in favour of:
void qsort_r(void *base, size_t nmemb, size_t size,
int (*compar)(const void *, const void *, void *),
on GNU and BSD systems at least?
Perhaps push it to lib/replace for the remaining systems?
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba
More information about the samba-technical