mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

150 lines
4.6 KiB

  1. diff -ru slrn-0.9.8.1.orig/src/group.c slrn-0.9.8.1/src/group.c
  2. --- slrn-0.9.8.1.orig/src/group.c 2004-08-15 23:09:31.000000000 +0200
  3. +++ slrn-0.9.8.1/src/group.c 2004-11-05 23:01:51.391610936 +0100
  4. @@ -3,7 +3,7 @@
  5. This file is part of SLRN.
  6. Copyright (c) 1994, 1999 John E. Davis <davis@space.mit.edu>
  7. - Copyright (c) 2001-2003 Thomas Schultz <tststs@gmx.de>
  8. + Copyright (c) 2001-2004 Thomas Schultz <tststs@gmx.de>
  9. This program is free software; you can redistribute it and/or modify it
  10. under the terms of the GNU General Public License as published by the Free
  11. @@ -2605,7 +2605,10 @@
  12. if ((p == pmax) || (p == vline))
  13. continue;
  14. - vline[vlen-1] = 0; /* kill \n and NULL terminate */
  15. + if (vline[vlen-1] == '\n')
  16. + vline[vlen-1] = 0;
  17. + else
  18. + vline[vlen] = 0;
  19. if (-1 == add_group (vline, (unsigned int) (p - vline),
  20. ((ch == '!') ? GROUP_UNSUBSCRIBED : 0), 0, 0))
  21. diff -ru slrn-0.9.8.1.orig/src/misc.c slrn-0.9.8.1/src/misc.c
  22. --- slrn-0.9.8.1.orig/src/misc.c 2004-09-27 23:30:35.000000000 +0200
  23. +++ slrn-0.9.8.1/src/misc.c 2004-11-05 23:02:09.519855024 +0100
  24. @@ -1165,8 +1165,11 @@
  25. if (vlen == 0) continue;
  26. line = slrn_safe_malloc (vlen+512); /* add some for MIME overhead */
  27. - slrn_strncpy (line, vline, vlen);
  28. - line[vlen-1] = 0; /* kill \n and NULL terminate */
  29. + strncpy (line, vline, vlen);
  30. + if (line[vlen-1] == '\n')
  31. + line[vlen-1] = 0;
  32. + else
  33. + line[vlen] = 0;
  34. if (header)
  35. {
  36. diff -ru slrn-0.9.8.1.orig/src/post.c slrn-0.9.8.1/src/post.c
  37. --- slrn-0.9.8.1.orig/src/post.c 2004-09-28 11:05:54.000000000 +0200
  38. +++ slrn-0.9.8.1/src/post.c 2004-11-05 23:02:53.936102728 +0100
  39. @@ -467,7 +467,10 @@
  40. linenum = 0;
  41. while ((NULL != (vline = vgets (vp, &vlen))) && (*vline != '\n'))
  42. {
  43. - vline[vlen-1] = 0;
  44. + if (vline[vlen-1] == '\n')
  45. + vline[vlen-1] = 0;
  46. + else
  47. + vline[vlen] = 0;
  48. linenum++;
  49. if (0 == slrn_case_strncmp ((unsigned char *)vline,
  50. (unsigned char *) "Cc: ", 4))
  51. @@ -540,7 +543,10 @@
  52. while ((NULL != (vline = vgets (vp, &vlen))) && (*vline != '\n'))
  53. {
  54. - vline[vlen-1] = 0;
  55. + if (vline[vlen-1] == '\n')
  56. + vline[vlen-1] = 0;
  57. + else
  58. + vline[vlen] = 0;
  59. linenum++;
  60. if (linenum == cc_line) continue;
  61. if (is_empty_header (vline)) continue;
  62. @@ -593,7 +599,10 @@
  63. while (NULL != (vline = vgets (vp, &vlen)))
  64. {
  65. - vline[vlen-1] = 0;
  66. + if (vline[vlen-1] == '\n')
  67. + vline[vlen-1] = 0;
  68. + else
  69. + vline[vlen] = 0;
  70. fputs (vline, pp);
  71. fputs ("\n", pp);
  72. }
  73. @@ -1411,8 +1420,11 @@
  74. if (vlen == 0) continue;
  75. linep = slrn_safe_malloc (vlen+512); /* add some for MIME overhead */
  76. - slrn_strncpy (linep, vline, vlen);
  77. - linep[vlen-1] = 0; /* kill \n and NULL terminate */
  78. + strncpy (linep, vline, vlen);
  79. + if (linep[vlen-1] == '\n')
  80. + linep[vlen-1] = 0; /* kill \n and NULL terminate */
  81. + else
  82. + linep[vlen] = 0;
  83. if (header)
  84. {
  85. diff -ru slrn-0.9.8.1.orig/src/slrnpull.c slrn-0.9.8.1/src/slrnpull.c
  86. --- slrn-0.9.8.1.orig/src/slrnpull.c 2004-02-28 23:08:17.000000000 +0100
  87. +++ slrn-0.9.8.1/src/slrnpull.c 2004-11-05 23:03:18.859313824 +0100
  88. @@ -3273,7 +3273,10 @@
  89. if (NULL != (vline = vgets (vp, &vlen)))
  90. {
  91. - vline[vlen] = 0; /* make sure line is NULL terminated */
  92. + if (vline[vlen-1] == '\n')
  93. + vline[vlen-1] = 0; /* make sure line is NULL terminated */
  94. + else
  95. + vline[vlen] = 0;
  96. group->headers = slrn_ranges_from_newsrc_line (vline);
  97. }
  98. @@ -3382,7 +3385,10 @@
  99. if (NULL == (group = find_group_type (vline)))
  100. continue;
  101. - vline[vlen-1] = 0; /* kill \n and NULL terminate */
  102. + if (vline[vlen-1] == '\n')
  103. + vline[vlen-1] = 0;
  104. + else
  105. + vline[vlen] = 0;
  106. r = slrn_ranges_from_newsrc_line (p+1);
  107. group->requests = slrn_ranges_merge (group->requests, r);
  108. diff -ru slrn-0.9.8.1.orig/src/spool.c slrn-0.9.8.1/src/spool.c
  109. --- slrn-0.9.8.1.orig/src/spool.c 2004-08-15 22:48:13.000000000 +0200
  110. +++ slrn-0.9.8.1/src/spool.c 2004-11-05 23:04:17.628379568 +0100
  111. @@ -1757,7 +1757,10 @@
  112. if (NULL != (vline = vgets (vp, &vlen)))
  113. {
  114. - vline[vlen] = 0; /* make sure line is NULL terminated */
  115. + if (vline[vlen-1] == '\n')
  116. + vline[vlen-1] = 0; /* make sure line is NULL terminated */
  117. + else
  118. + vline[vlen] = 0;
  119. retval = slrn_ranges_from_newsrc_line (vline);
  120. }
  121. @@ -1787,8 +1790,11 @@
  122. if ((p == pmax) || (p == vline) ||
  123. (strncmp(vline, group, (p-vline))))
  124. continue;
  125. -
  126. - vline[vlen-1] = 0; /* kill \n and NULL terminate */
  127. +
  128. + if (vline[vlen-1] == '\n')
  129. + vline[vlen-1] = 0;
  130. + else
  131. + vline[vlen] = 0;
  132. retval = slrn_ranges_from_newsrc_line (p+1);
  133. break;