On Wed, 12 Jul 2023, Robert Clausecker wrote: > I have just discovered that the bcmp() function on FreeBSD is > defective on 64 bit systems. It may errorneously return an > "equal" result when the buffers are not equal due to a > truncating cast in the return value. As OpenBSD uses the same > code, I believe you may be affected, too.
Umm, no, OpenBSD does not use the same code. OpenBSD fixed this in 2008. ---------------------------- revision 1.9 date: 2008/03/19 03:00:23; author: ray; state: Exp; lines: +4 -4; bcmp(3) tries to return length, which is a size_t, as an int. Instead, just return 1 if there is a difference. Found by lint. OK millert. ---------------------------- Best wishes. Philip Guenther