this post was submitted on 25 May 2026
993 points (99.2% liked)

Programmer Humor

31560 readers
2016 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] vrek@programming.dev 26 points 22 hours ago (1 children)

How do you sanitize your inputs or how do you exploit inputs which are not sanitized.

[โ€“] akunohana@piefed.blahaj.zone 25 points 22 hours ago (1 children)

Santize inputs.

I'll get back to you on exploits when I can write something that throws zero compilation errors. ๐Ÿ˜ˆ

[โ€“] vrek@programming.dev 20 points 21 hours ago (1 children)

Couple big things are 1. Only accept reasonable characters, on a white list instead of rejecting bad characters based on a black list. This will mean you are less likely to forget to block /0 for example. 2. Understand how strings work and ensure both reading and writing to that string doesn't extend beyond the end of memory allocated for the string. For example do you understand what the /0 would do to a string your program accepts?

[โ€“] akunohana@piefed.blahaj.zone 7 points 21 hours ago (1 children)

Sic! Thanks! I'll work on this this weekend! ๐Ÿ˜Š

[โ€“] vrek@programming.dev 9 points 21 hours ago

Keep in mind, the lowercase and uppercase letters are in continuous blocks on the ASCII table so you can can use that to verify if a char is a letter without doing an incredible long chain of if else statements.