MAXLEN definitely needed to be bigger to properly format fairly common
connection strings. In addition, the reliance on xsnprintf helps
detect cases where even this buffer is not long enough.
the buffer in parse_config has been made bigger in a bit of sloppy
programming, but what really needs to happen is reporting when a line
cannot be properly parsed/is too big for the buffer. That is just a
kludge.
Signed-off-by: Dan Farina <drfarina@acm.org>
Signed-off-by: Peter van Hardenberg <pvh@heroku.com>
Move out string operations to another file, and introduce a frontend
to snprintf for various situations. This change is important for
catching and eliminating sprintf overflows, which are as of now many
times silently corrupting memory.
Signed-off-by: Dan Farina <drfarina@acm.org>
Signed-off-by: Peter van Hardenberg <pvh@heroku.com>