3 ms·
Oh dear... that's one of the biggest footguns I've ever seen in all my years of working with C.
by ufo 6y ago
Oh dear... that's one of the biggest footguns I've ever seen in all my years of working with C.
- pja 6y agoIt is! Not mentioned anywhere in the manpages either & there’s no a priori reason for sscanf() to need to call strlen() on the input string, so most programmers would never expect it to. Pretty sure I would have made this error in the same situation, no question.