6 ms·
Oh, and their examples are weird. I found this snippet earlier on, and it made me go “Huh?” if(s[0] == '%' && s[1] == '2' && s[2] == '0') // escaped spac
by userbinator 12y ago
Oh, and their examples are weird. I found this snippet earlier on, and it made me go “Huh?”
if(s[0] == '%' && s[1] == '2' && s[2] == '0') // escaped space?
That can read past the end of the string if it ends in a '%'. The length check is missing. Maybe it's not such a big deal here, and this is only an example, but if the author's examples are this sloppy, and we can't see the actual source code of his server, then it's hard not to generalise.
- FooBarWidget 12y agoIt will not read past the string if it's null-terminated.
- viraptor 12y agoIt took me a moment to figure out why that won't happen. It could use a comment in that place.
- deleted 12y ago[deleted]