@jedisct1 how are you supposed to write a memcmp which doesn’t leak, when the user can choose the input length?
You can wrap around after you get past the end of one of the buffers (also compare the actual lengths).
-
-
how does one „wrap around“ in c without creating branches?
-
ptr[i % len]
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.