Fixed memory allocation to account for string termination character.

This commit is contained in:
pnenzi 2005-04-16 22:41:23 +00:00
parent 40017e1290
commit 7989c811fb
1 changed files with 1 additions and 1 deletions

View File

@ -306,7 +306,7 @@ static Status_t read_modpath(
model[n].cfunc_unique = TRUE; model[n].cfunc_unique = TRUE;
/* Put pathname into info structure */ /* Put pathname into info structure */
model[n].path_name = malloc(len); model[n].path_name = malloc(len+1);
strcpy(model[n].path_name, path); strcpy(model[n].path_name, path);
/* Increment count of paths read */ /* Increment count of paths read */