Shock and Awe
From The Hacker's Guide To GPSD:
The best way to avoid having dynamic-memory allocation problems is not to use malloc/free at all.
An interesting approach to avoiding dynamic memory problems which in general are not that hard to debug with good tools (such as Valgrind), especially in relatively simple pieces of code like gpsd. However, in the next section:
The parsing of GPGSV sentences in the NMEA driver has been a persistent and nasty trouble spot, causing more buffer overruns and weird secondary damage than all the rest of the code put together.
Personally, I often find that not allocating buffers on the stack and using dynamically allocated memory with length-bounded functions helps fix buffer overruns.
Length-bounded IO and string manipulation functions work equally well on static buffers. That said, if you are running into buffer overflows, it might indicate that fixed size buffers are not appropriate for the task ...
Perhaps they would have been better off isolating the driver code or writing it in a language with better string handling (they are already using Python, so that could be a possibility ...).
Using static data for me is strictly an afterthought for optimizations.
Now what did I came here to say actually? Ah right. Using static buffers is a thing that people learn by looking at "great code". And by that, they more often than not mean highly optimized code or libc. We all now glib isn't suitable for daemons for just this reason...
shotgun debugging at it's finest