From 7989c811fbc65a615f2bc091d38f2a9101f99df6 Mon Sep 17 00:00:00 2001 From: pnenzi Date: Sat, 16 Apr 2005 22:41:23 +0000 Subject: [PATCH] Fixed memory allocation to account for string termination character. --- src/xspice/cmpp/pp_lst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xspice/cmpp/pp_lst.c b/src/xspice/cmpp/pp_lst.c index 233abc6ec..d8508fbf2 100755 --- a/src/xspice/cmpp/pp_lst.c +++ b/src/xspice/cmpp/pp_lst.c @@ -306,7 +306,7 @@ static Status_t read_modpath( model[n].cfunc_unique = TRUE; /* Put pathname into info structure */ - model[n].path_name = malloc(len); + model[n].path_name = malloc(len+1); strcpy(model[n].path_name, path); /* Increment count of paths read */