Escape values directly into a buffer
Escape values directly into a buffer

Instead of precomputing a buffer length, do only one pass, extending the
buffer as necessary.

Signed-off-by: Miloslav Trmač <9c008e38982a5397deb855345fb164f0558459ae@redhat.com>
Signed-off-by: Gergely Nagy <6780fac3b38619ac20422286e4110a70dbba2203@balabit.hu>

deirf/libumberlog