News for hackers. Stuff that matters.
Re:Efficient string copying and concatenation in C by saagarjha on Friday September 13, 2019 @12:37AM (#20959208)
Here's my behavior:

  strstr(NULL, /* valid string */)
I can't find the needle in the haystack (actually, I can't find anything in the haystack. I can't find the haystack.) Thus I return NULL.

  strstr(/* valid string */, NULL)
I can't find the needle in the haystack (actually, I wouldn't be able to find it: I don't know what I'm looking for.) Return NULL.
Re:Efficient string copying and concatenation in C by codehero on Friday September 13, 2019 @06:45AM (#20960881)
You're explanation is not inconsistent with my proposal, but you don't seem to grasp VALIDITY.