libmicrohttpd2

HTTP server C library (MHD 2.x, alpha)
Log | Files | Refs | README | LICENSE

commit 455e8ba49c7e238122730612097f3ca4d84c2356
parent 9d4e56cd1e940b3662f850a843b2e6f911f4eb41
Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Date:   Thu, 25 Dec 2025 17:29:31 +0100

mhd_uint8_to_str_pad(): fixed work with zero-size buffer

Must be backported

Diffstat:
Msrc/mhd2/mhd_str.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/mhd2/mhd_str.c b/src/mhd2/mhd_str.c @@ -1911,6 +1911,9 @@ mhd_uint8_to_str_pad (uint8_t val, int digit; mhd_assert (3 >= min_digits); + if (0u == buf_size) + return 0u; + pos = 0; digit = val / 100; if (0 == digit)