libbootstr-c

C bootstring encoding library
git clone https://git.sinitax.com/sinitax/libbootstr-c
Log | Files | Refs | LICENSE | sfeed.txt

commit f38ecc088ce8b8dd4718b636f1f58df74fd4b0e0
parent 233416fe9d61809c7143463da5409ec9b9ae6078
Author: Louis Burda <quent.burda@gmail.com>
Date:   Mon, 30 Oct 2023 22:05:30 +0100

Check u8_to_u32 return

Diffstat:
Msrc/puny.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/src/puny.c b/src/puny.c @@ -100,6 +100,7 @@ main(int argc, const char **argv) if (tok) *tok = '\0'; u_in = u8_to_u32(in, inlen + 1, NULL, &u_inlen); + if (!u_in) errx(1, "invalid utf8"); u_out = NULL; if (encode) {