vasnprintf: Fix heap memory overrun bug.
commit278b4175c9d7dd47c1a3071554aac02add3b3c35
authorBruno Haible <bruno@clisp.org>
Sun, 23 Sep 2018 12:13:52 +0000 (23 14:13 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 23 Sep 2018 12:15:03 +0000 (23 14:15 +0200)
tree7bf2ed8b084f6fecbd1c78e946ece9d7211e233b
parent9e43f06a96907348ac6729dcddf8fddc08469ab3
vasnprintf: Fix heap memory overrun bug.

Reported by Ben Pfaff <blp@cs.stanford.edu> in
<https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00107.html>.

* lib/vasnprintf.c (convert_to_decimal): Allocate one more byte of
memory.
* tests/test-vasnprintf.c (test_function): Add another test.
ChangeLog
lib/vasnprintf.c
tests/test-vasnprintf.c