From 12e6a789ba8d86ac88463cf38312c71b101a8b45 Mon Sep 17 00:00:00 2001 From: oes Date: Tue, 17 Jul 2001 13:07:01 +0000 Subject: [PATCH] Fixed segv when last line in config files lacked a terminating (\r)\n --- loaders.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/loaders.c b/loaders.c index 8ce3c068..312fc2aa 100644 --- a/loaders.c +++ b/loaders.c @@ -1,4 +1,4 @@ -const char loaders_rcs[] = "$Id: loaders.c,v 1.18 2001/06/29 21:45:41 oes Exp $"; +const char loaders_rcs[] = "$Id: loaders.c,v 1.19 2001/07/13 14:01:54 oes Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/loaders.c,v $ @@ -35,6 +35,9 @@ const char loaders_rcs[] = "$Id: loaders.c,v 1.18 2001/06/29 21:45:41 oes Exp $" * * Revisions : * $Log: loaders.c,v $ + * Revision 1.19 2001/07/13 14:01:54 oes + * Removed all #ifdef PCRS + * * Revision 1.18 2001/06/29 21:45:41 oes * Indentation, CRLF->LF, Tab-> Space * @@ -605,6 +608,10 @@ char *read_config_line(char *buf, int buflen, FILE *fp, struct file_list *fs) { *p = '\0'; } + else + { + p = linebuf + strlen(linebuf); + } /* Line continuation? Trim escape and set flag. */ if ((p != linebuf) && (*--p == '\\')) -- 2.49.0