Skip to content

Commit b636eec

Browse files
author
J. Scott Berg
committed
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.
1 parent 4e0f374 commit b636eec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mad_table.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2132,7 +2132,7 @@ int
21322132
name_to_table_curr(const char* table, int* ending){
21332133
if(*ending==0) return string_to_table_curr(table,"name", current_node->name);
21342134

2135-
char tmp[strlen(current_node->p_elem->name)+3];
2135+
char tmp[strlen(current_node->p_elem->name)+5];
21362136
strcpy(tmp, current_node->p_elem->name);
21372137
if(*ending ==1) strcat(tmp, ".ENT");
21382138
if(*ending ==2) strcat(tmp, ".EXI");

0 commit comments

Comments
 (0)