News for hackers. Stuff that matters.

3xccc

Re: on Saturday September 25, 2021 @12:10PM (#28654210)
Thanks, I was looking for someone pointing out 1). I thought I miss something.
What about parsing an unknown number of at-most-4-digits integers from a string (being careful, as you exemplified)? Isn’t that a reasonable use of sscanf?

Do I need a full fledged parser for that? No. Does it have to traverse the whole string every time? No, because I’m being very clear about the maximum length of the thing I’m trying to parse.

You cannot not conclude that it’s a bug.