From 9db1105c32afd3dcf0c28b8186f08e63c761b2b5 Mon Sep 17 00:00:00 2001 From: Christopher Bazley Date: Sat, 26 Sep 2026 22:25:07 +0100 Subject: [PATCH] tccgen: Stop passing wrong buffer size to pstrcat in type_to_str --- tccgen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tccgen.c b/tccgen.c index d8f32875..1b634671 100644 --- a/tccgen.c +++ b/tccgen.c @@ -2752,7 +2752,7 @@ static void type_to_str(char *buf, int buf_size, pstrcat(buf1, sizeof(buf1), varstr); pstrcat(buf1, sizeof(buf1), ")"); } - pstrcat(buf1, buf_size, "("); + pstrcat(buf1, sizeof(buf1), "("); sa = s->next; while (sa != NULL) { char buf2[256]; @@ -2781,9 +2781,9 @@ static void type_to_str(char *buf, int buf_size, if (t & VT_RESTRICT) pstrcat(buf1, sizeof(buf1), "restrict "); if (t & VT_CONSTANT) - pstrcat(buf1, buf_size, "const "); + pstrcat(buf1, sizeof(buf1), "const "); if (t & VT_VOLATILE) - pstrcat(buf1, buf_size, "volatile "); + pstrcat(buf1, sizeof(buf1), "volatile "); if (varstr) pstrcat(buf1, sizeof(buf1), varstr); type_to_str(buf, buf_size, &s->type, buf1);