home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume1 / rn / patch35 < prev    next >
Internet Message Format  |  1986-11-30  |  3KB

  1. From ll-xn!nike!sri-spam!sri-unix!hplabs!sdcrdcf!lwall Wed Nov  5 08:30:18 EST 1986
  2. Article 300 of net.news.b:
  3. Path: adelie!ll-xn!nike!sri-spam!sri-unix!hplabs!sdcrdcf!lwall
  4. >From: lwall@sdcrdcf.UUCP (Larry Wall)
  5. Newsgroups: net.news.b,net.sources.bugs
  6. Subject: rn 4.3 patch #35
  7. Message-ID: <3401@sdcrdcf.UUCP>
  8. Date: 5 Nov 86 00:03:18 GMT
  9. Organization: System Development Corporation R&D, Santa Monica
  10. Lines: 97
  11. Xref: adelie net.news.b:300 net.sources.bugs:651
  12.  
  13. System: rn version 4.3
  14. Patch #: 35
  15. Priority: MEDIUM
  16. Subject: rn -c can produce a memory fault
  17. >From: jeffb@leia.GWD.TEK.COM (Jeff Beachy)
  18.  
  19. Description:
  20.     Patch #14 attempted to speed up "rn -c" by using a static buffer
  21.     instead of an malloc'ed one.  Unfortunately, buried deep down in
  22.     a routine called checkexpired there was an unguarded call to
  23.     saferealloc(), which calls realloc().  This will confuse realloc()
  24.     to no end, since it doesn't know how large the area being realloc'ed
  25.     is to begin with.
  26.  
  27. Fix:    From rn, say "| patch -d DIR", where DIR is your rn source directory.
  28.     Outside of rn, say "cd DIR; patch <thisarticle".  If you don't have
  29.     the patch program, apply the following by hand, or get patch.
  30.  
  31.     If patch indicates that patchlevel is the wrong version, you may need
  32.     to apply one or more previous patches, or the patch may already
  33.     have been applied.  See the patchlevel file to find out what has or
  34.     has not been applied.  In any event, don't continue with the patch.
  35.  
  36.     If you are missing previous patches they can be obtained from me:
  37.  
  38.     Larry Wall
  39.     {allegra,burdvax,cbosgd,hplabs,ihnp4,sdcsvax}!sdcrdcf!lwall
  40.  
  41.     If you send a mail message of the following form it will greatly speed
  42.     processing:
  43.  
  44.     Subject: Command
  45.     @SH mailpatch PATH rn 4.3 NUM ...
  46.  
  47.     where PATH is a return path FROM ME TO YOU in bang notation, and NUM
  48.     is the number of one or more patches you need, separated by spaces.
  49.  
  50. Index: patchlevel
  51. Prereq: 34
  52. 1c1
  53. < Patch #: 34
  54. ---
  55. > Patch #: 35
  56.  
  57. Index: rcln.c
  58. Prereq: 4.3.1.2
  59. *** rcln.c.old    Tue Nov  4 15:58:18 1986
  60. --- rcln.c    Tue Nov  4 15:58:23 1986
  61. ***************
  62. *** 1,4
  63. ! /* $Header: rcln.c,v 4.3.1.2 85/07/23 17:39:08 lwall Exp $
  64.    *
  65.    * $Log:    rcln.c,v $
  66.    * Revision 4.3.1.2  85/07/23  17:39:08  lwall
  67.  
  68. --- 1,4 -----
  69. ! /* $Header: rcln.c,v 4.3.1.3 86/11/04 15:57:03 lwall Exp $
  70.    *
  71.    * $Log:    rcln.c,v $
  72.    * Revision 4.3.1.3  86/11/04  15:57:03  lwall
  73. ***************
  74. *** 1,6
  75.   /* $Header: rcln.c,v 4.3.1.2 85/07/23 17:39:08 lwall Exp $
  76.    *
  77.    * $Log:    rcln.c,v $
  78.    * Revision 4.3.1.2  85/07/23  17:39:08  lwall
  79.    * Oops, was freeing a static buf on -c in checkexpired.
  80.    * 
  81.  
  82. --- 1,9 -----
  83.   /* $Header: rcln.c,v 4.3.1.3 86/11/04 15:57:03 lwall Exp $
  84.    *
  85.    * $Log:    rcln.c,v $
  86. +  * Revision 4.3.1.3  86/11/04  15:57:03  lwall
  87. +  * realloc attempted on unalloced area.
  88. +  * 
  89.    * Revision 4.3.1.2  85/07/23  17:39:08  lwall
  90.    * Oops, was freeing a static buf on -c in checkexpired.
  91.    * 
  92. ***************
  93. *** 427,433
  94.       *t++ = ',';
  95.       strcpy(t,s);
  96.       }
  97. !     if (mbuf == rcline[ngnum]) {
  98.       rcline[ngnum] = saferealloc(rcline[ngnum],
  99.           (MEM_SIZE)(rcnums[ngnum] + strlen(newnum) + 1));
  100.       }
  101.  
  102. --- 430,436 -----
  103.       *t++ = ',';
  104.       strcpy(t,s);
  105.       }
  106. !     if (!checkflag && mbuf == rcline[ngnum]) {
  107.       rcline[ngnum] = saferealloc(rcline[ngnum],
  108.           (MEM_SIZE)(rcnums[ngnum] + strlen(newnum) + 1));
  109.       }
  110.  
  111.  
  112.