[PATCH] Fix ldb_comparison_binary for blobs of differing lengths
jra at samba.org
Tue Jan 12 20:26:33 UTC 2016
On Tue, Jan 12, 2016 at 05:24:37PM +1300, Garming Sam wrote:
> The tests currently fail at samba4.nbt.winsreplication, which looks
> to be due to a hard-coded ordering. Will investigate further.
> On 12/01/16 16:25, Garming Sam wrote:
> >Recently Douglas and I have been investigating sorting issues and
> >come across an issue with ldb_comparison_binary. In the case of
> >two ldb_vals of the same length, the function produced the correct
> >functionality. However, in the case of differing lengths, the
> >function with simply return the shorter of the two (disregarding
> >the contents completely).
> >In terms of how the error came to be, the function appears to be
> >based on another which was intended to return either a YES or NO
> >answer on whether or not two values were the same. The problem
> >being that the function was then used as a standard comparison
> >function for sorting.
> >Attached is the patch to fix the issue. As far as consequences of
> >the error go, I'm not entirely sure what it actually broke at this
> >point. Besides the obvious sort module, it was a default/fallback
> >sort method and used in a few other places. A full make test is
> >currently running to see if it breaks autobuild.
Good catch Garming, let me know when you've fixed
the test breakage and I'll review this !
More information about the samba-technical