From: oes <oes@users.sourceforge.net>
Date: Tue, 17 Jul 2001 13:07:01 +0000 (+0000)
Subject: Fixed segv when last line in config files
X-Git-Tag: v_2_9_9~245
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/@default-cgi@/developer-manual/static/gitweb.js?a=commitdiff_plain;h=12e6a789ba8d86ac88463cf38312c71b101a8b45;p=privoxy.git

Fixed segv when last line in config files
 lacked a terminating (\r)\n
---

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 == '\\'))