Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 23 Sep 2018 03:44:46 +0000
From: Pascal Cuoq <cuoq@...st-in-soft.com>
To: "musl@...ts.openwall.com" <musl@...ts.openwall.com>
Subject: Re: un-UBify-strings


> On 23 Sep 2018, at 05:15, Rich Felker <dalias@...c.org> wrote:
> 
> dist(s,d)==n is a no-overlap case.

In this case the formula I proposed has the drawback of rejecting the case where (uintptr_t)s-(uintptr_t)d is exactly -n. This case may be the justification for the way the original comparison was expressed:

> (uintptr_t)s-(uintptr_t)d-n <= -2*n

(uintptr_t)s-(uintptr_t)d = -n   ==> comparison true by LHS and RHS being equal

(uintptr_t)s-(uintptr_t)d = n    ==> comparison true by LHS being zero

(uintptr_t)s-(uintptr_t)d > -n and (uintptr_t)s-(uintptr_t)d < n  ==> comparison false

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.