Looking at the code after a while, I noticed that all the string handling is a hot mess. There is lots of "let's say this will never be longer than x chars" code that creates buffers of random, hardcoded size, then goes on to stuff more into those buffers than they can actually hold. It's a miracle we haven't seen any segfaults from this so far. Go ahead an refactor this before it blows up in someone's face!
Looking at the code after a while, I noticed that all the string handling is a hot mess. There is lots of "let's say this will never be longer than x chars" code that creates buffers of random, hardcoded size, then goes on to stuff more into those buffers than they can actually hold. It's a miracle we haven't seen any segfaults from this so far. Go ahead an refactor this before it blows up in someone's face!