One of the rare examples of code incompatible with _FORTIFY_SOURCE=2 (with a fortified implementation of memcmp): https://android.googlesource.com/platform/system/bt/+/android-6.0.1_r10/stack/sdp/sdp_utils.c#795 ….
@ch3root @CopperheadSec @spun_off Whereas, for strcmp, it is only required that either [n-1] is valid for both or they differ before [n-1].
-
-
@BRIAN_____ I differ. strcmp must receive two valid strings. strncmp must receive two either-valid-strings-or-valid-up-to-n-1 pointers. -
@spun_off Sorry, that's what I mean. But the point is that memcmp gets to access s1[n-1] and s2[n-1] unconditionally, IIUC.
End of conversation
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.