home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume1 / rn / patch37 < prev    next >
Encoding:
Text File  |  1986-11-30  |  2.4 KB  |  86 lines

  1. /* Written  3:08 pm  Nov 17, 1986 by lwall@sdcrdcf.UUCP in mirror:news.software.b */
  2. /* ---------- "rn 4.3 patch #37" ---------- */
  3.  
  4. System: rn version 4.3
  5. Patch #: 37
  6. Priority: depends
  7. Subject: Rn dumps core on appending line to .newsrc
  8. From: mn-at1!alan (Alan Klietz)
  9.  
  10. Description:
  11.     Rn dumps core on adding a new newsgroup to the
  12.     .newsrc file.
  13.     
  14. Repeat by:
  15.     Create a new newsgroup and then run rn.
  16.     It may dump core depending on your machine type.
  17.  
  18. Fix:
  19.     The writelast() procedure in last.c does not check
  20.     the ngname string before before flushing out the last
  21.     line of the .newsrc file.  In certain circumstances
  22.     the ngname string is NULL.  On machines which do
  23.     not have *(char *)0 mapped into the address space
  24.     rn will halt with a segment violation error.
  25.  
  26.     The fix is to check the string before doing the write.
  27.  
  28.     From rn, say "| patch -d DIR", where DIR is your rn source directory.
  29.     Outside of rn, say "cd DIR; patch <thisarticle".  If you don't have
  30.     the patch program, apply the following by hand, or get patch.
  31.  
  32.     If patch indicates that patchlevel is the wrong version, you may need
  33.     to apply one or more previous patches, or the patch may already
  34.     have been applied.  See the patchlevel file to find out what has or
  35.     has not been applied.  In any event, don't continue with the patch.
  36.  
  37.     [Note, I cannot test this patch because rn is being rewritten--law]
  38.  
  39.     If you are missing previous patches they can be obtained from me:
  40.  
  41.     Larry Wall
  42.     {allegra,burdvax,cbosgd,hplabs,ihnp4,sdcsvax}!sdcrdcf!lwall
  43.  
  44.     If you send a mail message of the following form it will greatly speed
  45.     processing:
  46.  
  47.     Subject: Command
  48.     @SH mailpatch PATH rn 4.3 LIST
  49.  
  50.     where PATH is a return path FROM ME TO YOU in bang notation, and LIST
  51.     is a list of one or more patches you need, separated by spaces, commas
  52.     and/or hyphens.
  53.  
  54. Index: patchlevel
  55. Prereq: 36
  56. 1c1
  57. < Patch #: 36
  58. ---
  59. > Patch #: 37
  60.  
  61. Index: last.c
  62. Prereq: 
  63. *** last.c.orig    Sun Nov  9 23:11:11 1986
  64. --- last.c    Tue Nov 11 17:09:40 1986
  65. ***************
  66. *** 44,50
  67.   writelast()
  68.   {
  69.       if ((tmpfp = fopen(lastname,"w")) != Nullfp) {
  70. !     fprintf(tmpfp,"%s\n%ld\n%ld\n",ngname,(long)lasttime,(long)lastactsiz);
  71.       fclose(tmpfp);
  72.       }
  73.       else
  74.  
  75. --- 44,52 -----
  76.   writelast()
  77.   {
  78.       if ((tmpfp = fopen(lastname,"w")) != Nullfp) {
  79. !     if (ngname != Nullch)
  80. !         fprintf(tmpfp,"%s\n%ld\n%ld\n",
  81. !             ngname,(long)lasttime,(long)lastactsiz);
  82.       fclose(tmpfp);
  83.       }
  84.       else
  85. /* End of text from mirror:news.software.b */
  86.