diff options
author | Bill Nottingham <notting@redhat.com> | 1999-07-26 05:09:22 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 1999-07-26 05:09:22 +0000 |
commit | 846e98a797129bb4165acff138a8c23992743e77 (patch) | |
tree | 48c468a5ba687eb7a36d6df670a3abbd41a9a09a | |
parent | c4b747090b49bedb21fcef4bf0e2829c1be85746 (diff) | |
download | initscripts-846e98a797129bb4165acff138a8c23992743e77.tar initscripts-846e98a797129bb4165acff138a8c23992743e77.tar.gz initscripts-846e98a797129bb4165acff138a8c23992743e77.tar.bz2 initscripts-846e98a797129bb4165acff138a8c23992743e77.tar.xz initscripts-846e98a797129bb4165acff138a8c23992743e77.zip |
*** empty log message ***
-rw-r--r-- | src/initlog.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/initlog.c b/src/initlog.c index 9883f2db..e542d0f9 100644 --- a/src/initlog.c +++ b/src/initlog.c @@ -43,8 +43,9 @@ void readConfiguration(char *fname) { if ((fd=open(fname,O_RDONLY))==-1) return; if (fstat(fd,&sbuf)) return; - data=malloc(sbuf.st_size); + data=malloc(sbuf.st_size+1); if (read(fd,data,sbuf.st_size)!=sbuf.st_size) return; + data[sbuf.st_size] = '\0'; while ((line=getLine(&data))) { if (line[0]=='#') continue; if (!strncmp(line,"ignore ",7)) { |