home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume1 / rn / patch35 / text0000.txt < prev   
Encoding:
Text File  |  1986-11-30  |  2.8 KB  |  100 lines

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