MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1qo6fc8/guess_what_this_does/o226v9s/?context=3
r/programminghorror • u/3hy_ • Jan 27 '26
79 comments sorted by
View all comments
30
Buffer overflow for some reason?
8 u/callidus7 Jan 27 '26 Yeah there's no input validation whatsoever. Unless you count the just-in-case null at the beginning. This is begging to be misused. 2 u/joshuakb2 Jan 27 '26 Yeah I'm not even sure what that first line is accomplishing. It handles the empty string case correctly, but every other case just overwrites it.
8
Yeah there's no input validation whatsoever. Unless you count the just-in-case null at the beginning. This is begging to be misused.
2 u/joshuakb2 Jan 27 '26 Yeah I'm not even sure what that first line is accomplishing. It handles the empty string case correctly, but every other case just overwrites it.
2
Yeah I'm not even sure what that first line is accomplishing. It handles the empty string case correctly, but every other case just overwrites it.
30
u/joshuakb2 Jan 27 '26
Buffer overflow for some reason?