memory bug corrected

This commit is contained in:
cvs
2000-04-07 14:24:01 +00:00
parent 9c9a2d45a5
commit c70f0b7cb8
12 changed files with 45 additions and 25 deletions

View File

@@ -113,7 +113,7 @@ char *str_read_file(char *file) {
i=stat(file, &statbuf);
if (i<0) ERR_MSG("file not found");
size=statbuf.st_size+4;
ERR_SP(str=malloc(size));
ERR_SP(str=my_malloc(size, file));
e=&str[size-1];
ERR_SP(fil=fopen(file, "r"));
s=str;