From: Michael Orlitzky Date: Tue, 7 Jul 2026 13:56:26 +0000 (-0400) Subject: main.c: fix tocode malloc in test_iconv_suffix_drops_untranslatable() X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=4a7a46e77cf066ec0c3fedaf62df05e774046f8e;p=iconv-quirks.git main.c: fix tocode malloc in test_iconv_suffix_drops_untranslatable() A copy & paste mistake was allocating one byte fewer than we need. --- 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];