[PATCH] Fix ldb_comparison_binary for blobs of differing lengths

Garming Sam garming at catalyst.net.nz
Tue Jan 12 04:24:37 UTC 2016


The tests currently fail at samba4.nbt.winsreplication, which looks to 
be due to a hard-coded ordering. Will investigate further.


Cheers,

Garming

On 12/01/16 16:25, Garming Sam wrote:
> Hi,
>
> 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.
>
>
> Cheers,
>
> Garming




More information about the samba-technical mailing list