From b636eec90e1ade1d8062f23a6467adaa713589a5 Mon Sep 17 00:00:00 2001 From: "J. Scott Berg" Date: Tue, 18 Nov 2025 11:45:12 -0500 Subject: [PATCH] name_to_table_curr: fix temp buffer size calc Triggered address sanitizer error. Calculation is obviously wrong. Eliminated 11 test failures in test suite with sanitizer on. --- src/mad_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mad_table.c b/src/mad_table.c index 015e74fcc..9e8b973f9 100644 --- a/src/mad_table.c +++ b/src/mad_table.c @@ -2132,7 +2132,7 @@ int name_to_table_curr(const char* table, int* ending){ if(*ending==0) return string_to_table_curr(table,"name", current_node->name); - char tmp[strlen(current_node->p_elem->name)+3]; + char tmp[strlen(current_node->p_elem->name)+5]; strcpy(tmp, current_node->p_elem->name); if(*ending ==1) strcat(tmp, ".ENT"); if(*ending ==2) strcat(tmp, ".EXI");