News for hackers. Stuff that matters.
Re:Steam hit by major security breach by icebraining on Monday July 27, 2015 @07:39AM (#9954558)
Could (and should) a safer language pre-empt that you should first check strlen(str) != 0 before doing strcmp? I know of no language which does this.

In some languages, you can define a string type that only contains strings of one or more characters. And then you'd need to "convert" a regular string into one of those by using some function that forced you to handle the strlen(str) == 0 case.

I believe you can define that in Idris, for example.

There are no comments on this comment yet.