Welcome!
Unless specified otherwise, all code in the posts are in public domain. Feel free to use it, change it and share it! The posts themselves are licensed under this Creative Commons license. Social:
TwitterAbout Me
Hi, I'm Thomas Roth, a guy from Cologne, Germany who is interested in security research, programming and everything that's kind of hackable. This Blog is about the stuff that I like and do and I hope you enjoy it.
If you want to contact me:
input@stacksmashing.netCategories
- Broken Code (4)
- Code (1)
- Everyday Hacks (6)
- Everyday Problems (1)
- Security (7)
- Stuff (7)
- Tools (2)
Category Archives: Broken Code
Broken Code – Part 4
Today I found this lines of code: char var[9]; /* Some initialization of var… */ strcat(var, ‘\0′); Any ideas what this was meant to do? Update: Because I got some feedback telling me that this code is right, I’ve written … Continue reading
Broken Code – Part 3
Language: C This snippet of code is out of a closed source web application which is, according to the authors, ‘very secure because it was not written in PHP’: /* The integers szPrm1 and szPrm2 were used somewhere above this … Continue reading
Broken Code – Part 2
Language: PHP This is a snippet which I found in a relatively large commercial (closed source) web application some time ago: foreach($_REQUEST as $key => $value){eval("\$".$key."=\"".$value."\";");} A little bit cleaner: foreach($_REQUEST as $key => $value) { eval("\$".$key."=\"".$value."\";"); } … Continue reading
Broken Code – Part 1
Language: C I just found something like the following in a commercial enterprise C project: char var = ‘N’; (void)scanf("%s", &var); fflush(stdin); My first thought when I looked at the code was like “What the f**k?“, as the coder did … Continue reading