News for hackers. Stuff that matters.
Re:Ask HN: Weirdest hack that you ever saw in production? by Kubi on Sunday March 25, 2018 @07:59AM (#16671793)
Big C codebase. To be more precise, they said it's C++, but as far as I could see, it was C compiled with g++.

Some code read xml data. Instead of choosing one of the xml-parsers available, author decided to write another one. Instead of using C++ features, atoi() used. For empty strings, atoi() got NULL and segfaulted. Signal 11 has been handled and suppressed in order to avoid crashes. Certainly, the code had other segmentation faults too, which could not been discovered this way. :)

Re:Ask HN: Weirdest hack that you ever saw in production? by ComputerGuru on Sunday March 25, 2018 @08:20AM (#16671854)
You mean, instead of fixing _just_ the atoi() crash, that developer fixed all crashes with his patch? Quite the clever bastard!
Re:Ask HN: Weirdest hack that you ever saw in production? by op00to on Sunday March 25, 2018 @01:38PM (#16673298)
Was this a telco? This sounds surprisingly familiar.