HN2new | past | comments | ask | show | jobs | submitlogin

No. We didn't write the example. We're not going to clean it up. Find the bug in this messy code, or (allegorically) ship code that attackers can take over and explain why you did it to your customers.

Now you're starting to see what a nightmare these problems are for developers.



> Find the bug in this messy code, or (allegorically) ship code

, or rewrite this code to use proper checking of untrusted data. I don't know the specifics of your code audits, but the only verdict for the code like this should be to redo it.

If the client is uncooperative or if the reviewer has spare time, then, yeah, try and find the actual exploit. Perhaps, if it is an interview question, it's understandable too. Other than that I don't see a clear reason for going this deep into analyzing dirty code. It may or may not contain an exploitable bug, so just clean it up and move on.


I'm starting to see why I don't use intrinsically unsafe languages like C and C++.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: