Yes, when people point out this bug, it seems crazy. Who does a binary search of 1GB of sorted data which only contains values from 0...255 (or -128...127). I mean it is a bug, but it's also the wrong data structure for that data...
> to use a 32-bit element count on a 64-bit system is itself a more valid bug
Yes, this one is real. Even ignoring the binary search algorithm, I cringe whenever I see people use "int" as a loop index. 2 gig arrays were very common in the work I used to do.
I also cringe when I see people used unsigned (size_t) loop indices, but that's a deeper topic.