Commit e61015e2 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Prevent spacial error.

parent 0d64ceb8
...@@ -730,7 +730,8 @@ void tableFWriteC(FILE *ptfp, int tableID) ...@@ -730,7 +730,8 @@ void tableFWriteC(FILE *ptfp, int tableID)
} }
} }
strcpy(tablename, parTable[tableID].name); strncpy(tablename, parTable[tableID].name, sizeof (tablename));
tablename[sizeof (tablename) - 1] = '\0';
{ {
size_t len = strlen(tablename); size_t len = strlen(tablename);
for (size_t i = 0; i < len; i++ ) for (size_t i = 0; i < len; i++ )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment