as well as the header count (which i came here to post), there's another suspicious hard-coded size limit in the number of servers (1000). although you could only crash the system in that case by configuring too many.
there's very little error handling. good c code returns error codes all over the damn place. this hardly has any.