From e54f3e197f479198e284b8103d06bbe2e24fbbae Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Thu, 12 May 2005 21:13:52 +0000 Subject: [PATCH] Changed xmalloc to avoid crash when running as a service SVN revision: 1365 --- src/elogd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/elogd.c b/src/elogd.c index 0a952a5f..4d85bbb2 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -6,6 +6,9 @@ Contents: Web server program for Electronic Logbook ELOG $Log$ + Revision 1.658 2005/05/12 21:13:52 ritt + Changed xmalloc to avoid crash when running as a service + Revision 1.657 2005/05/12 20:59:31 ritt Added printf() to avoid windows crash on long config files @@ -3311,7 +3314,7 @@ int parse_config_file(char *file_name) char *str, *buffer, *p, *pstr; int index, i, j, fh, length; - str = xmalloc(10000); + str = xmalloc(20000); /* open configuration file */ fh = open(file_name, O_RDONLY | O_BINARY); @@ -22978,8 +22981,6 @@ int main(int argc, char *argv[]) struct tm *tms; struct stat finfo; - printf(""); /* needed by windows, otherwis crash on long config files ??? */ - #ifdef OS_UNIX /* save gid/uid to regain later */ orig_gid = getegid();