diff --git a/ChangeLog b/ChangeLog index fcff67db8..4c9784b60 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ (755 instead of 644) * fteext.h spiceif.c options.c dotcards.c: .options NOACCT added * /tests/.../*.cir .options noacct added (except BSIM3 files) + * main.c:614 allow null terminator in string 2009-02-22 Dietmar Warning * devices/adms/mextram: Update to release version 504.7 now with selfheating diff --git a/src/main.c b/src/main.c index df4bf664d..cbf779aec 100644 --- a/src/main.c +++ b/src/main.c @@ -611,7 +611,7 @@ read_initialisation_file(char * dir, char * name) asprintf(&path, "%s" DIR_PATHSEP "%s", dir,name); if(path==NULL) return FALSE; /* memory allocation error */ #else /* ~ HAVE_ASPRINTF */ - path=(char*)tmalloc(1 + strlen(dir)+strlen(name)); + path=(char*)tmalloc(2 + strlen(dir)+strlen(name)); if(path==NULL) return FALSE; /* memory allocation error */ sprintf(path,"%s" DIR_PATHSEP "%s",dir,name); #endif /* HAVE_ASPRINTF */