Subject: [PATCH] vasnprintf: Fix heap memory overrun bug. 34/256134/1 accepted/tizen_6.0_base accepted/tizen_6.0_base_tool tizen_6.0_base accepted/tizen/6.0/base/20230713.142810 accepted/tizen/6.0/base/tool/20210402.005830 submit/tizen_6.0_base/20210330.060858
authorBruno Haible <bruno@clisp.org>
Tue, 30 Mar 2021 02:44:30 +0000 (11:44 +0900)
committerJinWang An <jinwang.an@samsung.com>
Tue, 30 Mar 2021 02:51:14 +0000 (11:51 +0900)
commite12519bbf320b2cdf49ccb95f01e6debcac3660a
tree59c74b8a1dfc8ed269ee72ae190d902c623599ad
parentaf7e46e444fe3abfd1b9b6a0054d6ad201adc209
Subject: [PATCH] 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.

Change-Id: I06fab298f8c383605db52742959e60822f7f143e
Signed-off-by: JinWang An <jinwang.an@samsung.com>
gnu/vasnprintf.c