3 ms·
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
by Kubi 9y ago
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. :)
- ComputerGuru 9y agoYou mean, instead of fixing _just_ the atoi() crash, that developer fixed all crashes with his patch? Quite the clever bastard!
- op00to 9y agoWas this a telco? This sounds surprisingly familiar.