]> git.ipfire.org Git - thirdparty/json-c.git/commit
initialize null terminator of new printbuf 239/head
authorPierce Lopez <pierce.lopez@gmail.com>
Sat, 16 Jul 2016 04:30:31 +0000 (00:30 -0400)
committerPierce Lopez <pierce.lopez@gmail.com>
Sat, 16 Jul 2016 04:30:31 +0000 (00:30 -0400)
commit868b20ce4e8ff745ae78c5a5368005d26e865f42
treef9c198b17456779026bd025c78c0bfbee68b9464
parent2b255d0ebf43b66339aa649d9ebe29cdb4b12148
initialize null terminator of new printbuf

It's possible (e.g. by using json_object_from_file() on an empty file)
to get json-c to try to use a printbuf that has never had anything
written to it. Before this change, it could access a string that
should be length zero, but was never initialized, and could
theoretically have an unexpected string.
printbuf.c