remove heap overflow ion tfree(path)

This commit is contained in:
h_vogt 2009-02-22 21:02:25 +00:00
parent 5ab7e9d384
commit fdb0e0bed7
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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 */