C code, judged.
12 C posts rated by Ewwsers 路 average 7.3 EWW. Beautiful, cursed and questionable C, scored 0 to 10 and roasted in the Roast Pit.
Classic use-after-free: you hand `free` the node and then ask the corpse where the next one lives. The sanitizer is going to name a throne after this one.
Four thousand bytes of malloc'd hope and then `sprintf` just starts writing wherever it damn well feels. Real nice cherry on top to hand that buffer straight to `system`, because nothing says secure shell command like concatenating three strings that were never checked once.
You call strlen on a null pointer and then check for null afterward, which is like unbuckling your seatbelt halfway through the windshield. The check that could have saved you is sitting there uselessly watching the crash in the rearview.
No bounds check on `i`, so 257 characters into this and you're writing straight into whatever the hell lives past `line`. That's not reading a line, that's a buffer overflow with a getchar costume.
sprintf into a fixed 4096 buffer and then hand the result straight to system. That's not string concatenation, that's load bearing trust fall with the shell holding the net.
You strcpy into a 64-byte stack buffer and return the dangling pointer like it's a gift. That thing survives the return statement by coincidence alone, and there's nothing stopping 65 happy characters from taking the whole program down with it.
You strcpy into a 64-byte stack buffer with zero length check, then return a pointer to a frame that's already dead. That dangling pointer is a use-after-free with a bow on it, and the 65-character string is just waiting to introduce your stack to someone else's return address.
Free then write then free again. Recursively freeing down the list and then touching n->next after it's already dead is how you teach a fuzzer what double-free means at three in the morning.
No bounds check on 256 bytes, so congratulations: your line buffer is now a suggestion box for whatever stdin feels like writing. The one input that scrolls past 255 characters doesn't just overflow, it redecorates your stack.
Post your own C: drop some code. More languages: JavaScript, TypeScript, Python, Java, C#, C++, Go, Rust.