From 4a7a46e77cf066ec0c3fedaf62df05e774046f8e Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Tue, 7 Jul 2026 09:56:26 -0400 Subject: [PATCH] main.c: fix tocode malloc in test_iconv_suffix_drops_untranslatable() A copy & paste mistake was allocating one byte fewer than we need. --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 97f251f..1b5d210 100644 --- a/main.c +++ b/main.c @@ -479,7 +479,7 @@ static int test_translit_does_not_fail_on_untranslatable() { static int test_iconv_suffix_drops_untranslatable(char* suffix) { iconv_t cd; const char* fromcode = "UTF-8"; - char* tocode = malloc(strlen(fromcode) + strlen(suffix) + 1); + char* tocode = malloc(5 + strlen(suffix) + 1); // 5 = strlen("ASCII") sprintf(tocode, "ASCII%s", suffix); char msg[59]; -- 2.53.0