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.

169 lines
5.5 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/tsa/slrn/slrn-0.9.8.1-lastchar2.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. #
  18. # --- ROCK-COPYRIGHT-NOTE-END ---
  19. diff -ru slrn-0.9.8.1.orig/src/group.c slrn-0.9.8.1/src/group.c
  20. --- slrn-0.9.8.1.orig/src/group.c 2004-08-15 23:09:31.000000000 +0200
  21. +++ slrn-0.9.8.1/src/group.c 2004-11-05 23:01:51.391610936 +0100
  22. @@ -3,7 +3,7 @@
  23. This file is part of SLRN.
  24. Copyright (c) 1994, 1999 John E. Davis <davis@space.mit.edu>
  25. - Copyright (c) 2001-2003 Thomas Schultz <tststs@gmx.de>
  26. + Copyright (c) 2001-2004 Thomas Schultz <tststs@gmx.de>
  27. This program is free software; you can redistribute it and/or modify it
  28. under the terms of the GNU General Public License as published by the Free
  29. @@ -2605,7 +2605,10 @@
  30. if ((p == pmax) || (p == vline))
  31. continue;
  32. - vline[vlen-1] = 0; /* kill \n and NULL terminate */
  33. + if (vline[vlen-1] == '\n')
  34. + vline[vlen-1] = 0;
  35. + else
  36. + vline[vlen] = 0;
  37. if (-1 == add_group (vline, (unsigned int) (p - vline),
  38. ((ch == '!') ? GROUP_UNSUBSCRIBED : 0), 0, 0))
  39. diff -ru slrn-0.9.8.1.orig/src/misc.c slrn-0.9.8.1/src/misc.c
  40. --- slrn-0.9.8.1.orig/src/misc.c 2004-09-27 23:30:35.000000000 +0200
  41. +++ slrn-0.9.8.1/src/misc.c 2004-11-05 23:02:09.519855024 +0100
  42. @@ -1165,8 +1165,11 @@
  43. if (vlen == 0) continue;
  44. line = slrn_safe_malloc (vlen+512); /* add some for MIME overhead */
  45. - slrn_strncpy (line, vline, vlen);
  46. - line[vlen-1] = 0; /* kill \n and NULL terminate */
  47. + strncpy (line, vline, vlen);
  48. + if (line[vlen-1] == '\n')
  49. + line[vlen-1] = 0;
  50. + else
  51. + line[vlen] = 0;
  52. if (header)
  53. {
  54. diff -ru slrn-0.9.8.1.orig/src/post.c slrn-0.9.8.1/src/post.c
  55. --- slrn-0.9.8.1.orig/src/post.c 2004-09-28 11:05:54.000000000 +0200
  56. +++ slrn-0.9.8.1/src/post.c 2004-11-05 23:02:53.936102728 +0100
  57. @@ -467,7 +467,10 @@
  58. linenum = 0;
  59. while ((NULL != (vline = vgets (vp, &vlen))) && (*vline != '\n'))
  60. {
  61. - vline[vlen-1] = 0;
  62. + if (vline[vlen-1] == '\n')
  63. + vline[vlen-1] = 0;
  64. + else
  65. + vline[vlen] = 0;
  66. linenum++;
  67. if (0 == slrn_case_strncmp ((unsigned char *)vline,
  68. (unsigned char *) "Cc: ", 4))
  69. @@ -540,7 +543,10 @@
  70. while ((NULL != (vline = vgets (vp, &vlen))) && (*vline != '\n'))
  71. {
  72. - vline[vlen-1] = 0;
  73. + if (vline[vlen-1] == '\n')
  74. + vline[vlen-1] = 0;
  75. + else
  76. + vline[vlen] = 0;
  77. linenum++;
  78. if (linenum == cc_line) continue;
  79. if (is_empty_header (vline)) continue;
  80. @@ -593,7 +599,10 @@
  81. while (NULL != (vline = vgets (vp, &vlen)))
  82. {
  83. - vline[vlen-1] = 0;
  84. + if (vline[vlen-1] == '\n')
  85. + vline[vlen-1] = 0;
  86. + else
  87. + vline[vlen] = 0;
  88. fputs (vline, pp);
  89. fputs ("\n", pp);
  90. }
  91. @@ -1411,8 +1420,11 @@
  92. if (vlen == 0) continue;
  93. linep = slrn_safe_malloc (vlen+512); /* add some for MIME overhead */
  94. - slrn_strncpy (linep, vline, vlen);
  95. - linep[vlen-1] = 0; /* kill \n and NULL terminate */
  96. + strncpy (linep, vline, vlen);
  97. + if (linep[vlen-1] == '\n')
  98. + linep[vlen-1] = 0; /* kill \n and NULL terminate */
  99. + else
  100. + linep[vlen] = 0;
  101. if (header)
  102. {
  103. diff -ru slrn-0.9.8.1.orig/src/slrnpull.c slrn-0.9.8.1/src/slrnpull.c
  104. --- slrn-0.9.8.1.orig/src/slrnpull.c 2004-02-28 23:08:17.000000000 +0100
  105. +++ slrn-0.9.8.1/src/slrnpull.c 2004-11-05 23:03:18.859313824 +0100
  106. @@ -3273,7 +3273,10 @@
  107. if (NULL != (vline = vgets (vp, &vlen)))
  108. {
  109. - vline[vlen] = 0; /* make sure line is NULL terminated */
  110. + if (vline[vlen-1] == '\n')
  111. + vline[vlen-1] = 0; /* make sure line is NULL terminated */
  112. + else
  113. + vline[vlen] = 0;
  114. group->headers = slrn_ranges_from_newsrc_line (vline);
  115. }
  116. @@ -3382,7 +3385,10 @@
  117. if (NULL == (group = find_group_type (vline)))
  118. continue;
  119. - vline[vlen-1] = 0; /* kill \n and NULL terminate */
  120. + if (vline[vlen-1] == '\n')
  121. + vline[vlen-1] = 0;
  122. + else
  123. + vline[vlen] = 0;
  124. r = slrn_ranges_from_newsrc_line (p+1);
  125. group->requests = slrn_ranges_merge (group->requests, r);
  126. diff -ru slrn-0.9.8.1.orig/src/spool.c slrn-0.9.8.1/src/spool.c
  127. --- slrn-0.9.8.1.orig/src/spool.c 2004-08-15 22:48:13.000000000 +0200
  128. +++ slrn-0.9.8.1/src/spool.c 2004-11-05 23:04:17.628379568 +0100
  129. @@ -1757,7 +1757,10 @@
  130. if (NULL != (vline = vgets (vp, &vlen)))
  131. {
  132. - vline[vlen] = 0; /* make sure line is NULL terminated */
  133. + if (vline[vlen-1] == '\n')
  134. + vline[vlen-1] = 0; /* make sure line is NULL terminated */
  135. + else
  136. + vline[vlen] = 0;
  137. retval = slrn_ranges_from_newsrc_line (vline);
  138. }
  139. @@ -1787,8 +1790,11 @@
  140. if ((p == pmax) || (p == vline) ||
  141. (strncmp(vline, group, (p-vline))))
  142. continue;
  143. -
  144. - vline[vlen-1] = 0; /* kill \n and NULL terminate */
  145. +
  146. + if (vline[vlen-1] == '\n')
  147. + vline[vlen-1] = 0;
  148. + else
  149. + vline[vlen] = 0;
  150. retval = slrn_ranges_from_newsrc_line (p+1);
  151. break;