News for hackers. Stuff that matters.
Re:Memcmp being wrongly stripped like strcmp by nullc on Friday October 09, 2020 @01:40AM (#24727178)
Actually this is a common sort of bug I've seen programmers implement, e.g. using strcpy where memcpy should be used or vice versa. Most common on interface boundaries with other languages, particular "everything is a string" languages.

So it's not that shocking to see a similar sort of bug made inside the compiler.

Re:Memcmp being wrongly stripped like strcmp by marcan_42 on Friday October 09, 2020 @02:05AM (#24727283)
That's how the Wii got pwned. They were comparing binary SHA-1 hashes in RSA signatures with strncmp.

They also weren't checking padding, so you didn't have to use a real signature with a 00 byte in a convenient place (though I did find one), but rather could just use an all-00 signature, because performing the RSA computation on zero yields zero.

Re:Memcmp being wrongly stripped like strcmp by admax88q on Friday October 09, 2020 @12:43PM (#24731712)
I wonder how many bugs C strings have been responsible for, all because storing a null byte at the end seems more efficient than storing a length up front.
Re:Memcmp being wrongly stripped like strcmp by userbinator on Saturday October 10, 2020 @03:34PM (#24741280)
Good example of how a little insecurity is sometimes a good thing.