diff -ur slrn-0.9.8.1.orig/src/group.c slrn-0.9.8.1/src/group.c
--- slrn-0.9.8.1.orig/src/group.c	2004-08-15 23:09:31.000000000 +0200
+++ slrn-0.9.8.1/src/group.c	2004-10-14 14:53:47.788281512 +0200
@@ -3,7 +3,7 @@
  This file is part of SLRN.
 
  Copyright (c) 1994, 1999 John E. Davis <davis@space.mit.edu>
- Copyright (c) 2001-2003 Thomas Schultz <tststs@gmx.de>
+ Copyright (c) 2001-2004 Thomas Schultz <tststs@gmx.de>
 
  This program is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published by the Free
@@ -2605,7 +2605,8 @@
 	if ((p == pmax) || (p == vline))
 	  continue;
      
-	vline[vlen-1] = 0;	       /* kill \n and NULL terminate */
+	if (vline[vlen-1] == '\n')
+	  vline[vlen-1] = 0;
 
 	if (-1 == add_group (vline, (unsigned int) (p - vline),
 			     ((ch == '!') ? GROUP_UNSUBSCRIBED : 0), 0, 0))
diff -ur slrn-0.9.8.1.orig/src/misc.c slrn-0.9.8.1/src/misc.c
--- slrn-0.9.8.1.orig/src/misc.c	2004-09-27 23:30:35.000000000 +0200
+++ slrn-0.9.8.1/src/misc.c	2004-10-14 14:53:47.839273760 +0200
@@ -1165,8 +1165,9 @@
 	     if (vlen == 0) continue;
 	     
 	     line = slrn_safe_malloc (vlen+512); /* add some for MIME overhead */
-	     slrn_strncpy (line, vline, vlen);
-	     line[vlen-1] = 0;		/* kill \n and NULL terminate */
+	     strncpy (line, vline, vlen);
+	     if (line[vlen-1] == '\n')
+	       line[vlen-1] = 0;
 
 	     if (header)
 	       {
diff -ur slrn-0.9.8.1.orig/src/post.c slrn-0.9.8.1/src/post.c
--- slrn-0.9.8.1.orig/src/post.c	2004-09-28 11:05:54.000000000 +0200
+++ slrn-0.9.8.1/src/post.c	2004-10-14 14:53:47.888266312 +0200
@@ -467,7 +467,8 @@
    linenum = 0;
    while ((NULL != (vline = vgets (vp, &vlen))) && (*vline != '\n'))
      {
-	vline[vlen-1] = 0;
+	if (vline[vlen-1] == '\n')
+	  vline[vlen-1] = 0;
 	linenum++;
 	if (0 == slrn_case_strncmp ((unsigned char *)vline,
 				    (unsigned char *) "Cc: ", 4))
@@ -540,7 +541,8 @@
 
    while ((NULL != (vline = vgets (vp, &vlen))) && (*vline != '\n'))
      {
-	vline[vlen-1] = 0;
+	if (vline[vlen-1] == '\n')
+	  vline[vlen-1] = 0;
 	linenum++;
 	if (linenum == cc_line) continue;
 	if (is_empty_header (vline)) continue;
@@ -593,7 +595,8 @@
 
    while (NULL != (vline = vgets (vp, &vlen)))
      {
-	vline[vlen-1] = 0;
+	if (vline[vlen-1] == '\n')
+	  vline[vlen-1] = 0;
 	fputs (vline, pp);
 	fputs ("\n", pp);
      }
@@ -1411,8 +1414,9 @@
 	if (vlen == 0) continue;
 
 	linep = slrn_safe_malloc (vlen+512); /* add some for MIME overhead */
-	slrn_strncpy (linep, vline, vlen);
-	linep[vlen-1] = 0;	/* kill \n and NULL terminate */
+	strncpy (linep, vline, vlen);
+	if (linep[vlen-1] == '\n')
+	  linep[vlen-1] = 0;	/* kill \n and NULL terminate */
 	
 	if (header)
 	  {
diff -ur slrn-0.9.8.1.orig/src/slrnpull.c slrn-0.9.8.1/src/slrnpull.c
--- slrn-0.9.8.1.orig/src/slrnpull.c	2004-02-28 23:08:17.000000000 +0100
+++ slrn-0.9.8.1/src/slrnpull.c	2004-10-14 14:53:47.940258408 +0200
@@ -3273,7 +3273,8 @@
 	
 	if (NULL != (vline = vgets (vp, &vlen)))
 	  {
-	     vline[vlen] = 0; /* make sure line is NULL terminated */
+	     if (vline[vlen-1] == '\n')
+	       vline[vlen-1] = 0; /* make sure line is NULL terminated */
 	     group->headers = slrn_ranges_from_newsrc_line (vline);
 	  }
 	
@@ -3382,7 +3383,8 @@
 	     if (NULL == (group = find_group_type (vline)))
 	       continue;
 	     
-	     vline[vlen-1] = 0;	       /* kill \n and NULL terminate */
+	     if (vline[vlen-1] == '\n')
+	       vline[vlen-1] = 0;
 	     
 	     r = slrn_ranges_from_newsrc_line (p+1);
 	     group->requests = slrn_ranges_merge (group->requests, r);
diff -ur slrn-0.9.8.1.orig/src/spool.c slrn-0.9.8.1/src/spool.c
--- slrn-0.9.8.1.orig/src/spool.c	2004-08-15 22:48:13.000000000 +0200
+++ slrn-0.9.8.1/src/spool.c	2004-10-14 14:53:47.988251112 +0200
@@ -1757,7 +1757,8 @@
    
    if (NULL != (vline = vgets (vp, &vlen)))
      {
-	vline[vlen] = 0; /* make sure line is NULL terminated */
+	if (vline[vlen-1] == '\n')
+	  vline[vlen-1] = 0; /* make sure line is NULL terminated */
 	retval = slrn_ranges_from_newsrc_line (vline);
      }
    
@@ -1787,8 +1788,9 @@
 	if ((p == pmax) || (p == vline) ||
 	    (strncmp(vline, group, (p-vline))))
 	  continue;
-     
-	vline[vlen-1] = 0;	       /* kill \n and NULL terminate */
+
+	if (vline[vlen-1] == '\n')
+	  vline[vlen-1] = 0;
 	
 	retval = slrn_ranges_from_newsrc_line (p+1);
 	break;
