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

  1. Patch #: 22
  2. Priority: MEDIUM
  3. Subject: Patch #14 causes malloc mixups on "rn -c"
  4. >From: dsp@ptsfa.UUCP (David St. Pierre), landauer@drivax.UUCP (Doug Landauer)
  5.  
  6. Description:
  7.     Patch #14 attempted to speed up "rn -c" by using a static buffer
  8.     instead of an malloc'ed one.  Unfortunately, buried deep down in
  9.     a routine called checkexpired there was an unguarded call to free().
  10.     This can confuse malloc if there is more than one newsgroup with
  11.     expired articles to account for.
  12.  
  13. Fix:    From rn, say "| patch -d DIR", where DIR is your rn source directory.
  14.     Outside of rn, say "cd DIR; patch <thisarticle".  If you don't have
  15.     the patch program, apply the following by hand, or get patch.
  16.  
  17.     If patch indicates that patchlevel is the wrong version, you may need
  18.     to apply one or more previous patches, or the patch may already
  19.     have been applied.  See the patchlevel file to find out what has or
  20.     has not been applied.  In any event, don't continue with the patch.
  21.  
  22. Index: patchlevel
  23. Prereq: 21
  24. 1c1
  25. < Patch #: 21
  26. ---
  27. > Patch #: 22
  28.  
  29. Index: rcln.c
  30. Prereq: 4.3
  31. *** rcln.c.old    Tue Jul 23 17:40:30 1985
  32. --- rcln.c    Tue Jul 23 17:40:33 1985
  33. ***************
  34. *** 1,4
  35. ! /* $Header: rcln.c,v 4.3 85/05/01 11:45:36 lwall Exp $
  36.    *
  37.    * $Log:    rcln.c,v $
  38.    * Revision 4.3  85/05/01  11:45:36  lwall
  39.  
  40. --- 1,4 -----
  41. ! /* $Header: rcln.c,v 4.3.1.2 85/07/23 17:39:08 lwall Exp $
  42.    *
  43.    * $Log:    rcln.c,v $
  44.    * Revision 4.3.1.2  85/07/23  17:39:08  lwall
  45. ***************
  46. *** 1,6
  47.   /* $Header: rcln.c,v 4.3 85/05/01 11:45:36 lwall Exp $
  48.    *
  49.    * $Log:    rcln.c,v $
  50.    * Revision 4.3  85/05/01  11:45:36  lwall
  51.    * Baseline for release with 4.3bsd.
  52.    * 
  53.  
  54. --- 1,12 -----
  55.   /* $Header: rcln.c,v 4.3.1.2 85/07/23 17:39:08 lwall Exp $
  56.    *
  57.    * $Log:    rcln.c,v $
  58. +  * Revision 4.3.1.2  85/07/23  17:39:08  lwall
  59. +  * Oops, was freeing a static buf on -c in checkexpired.
  60. +  * 
  61. +  * Revision 4.3.1.1  85/05/10  11:37:08  lwall
  62. +  * Branch for patches.
  63. +  * 
  64.    * Revision 4.3  85/05/01  11:45:36  lwall
  65.    * Baseline for release with 4.3bsd.
  66.    * 
  67. ***************
  68. *** 426,432
  69.           (MEM_SIZE)(rcnums[ngnum] + strlen(newnum) + 1));
  70.       }
  71.       else {
  72. !     free(rcline[ngnum]);
  73.       rcline[ngnum] = mbuf;
  74.       }
  75.   
  76.  
  77. --- 432,439 -----
  78.           (MEM_SIZE)(rcnums[ngnum] + strlen(newnum) + 1));
  79.       }
  80.       else {
  81. !     if (!checkflag)
  82. !         free(rcline[ngnum]);
  83.       rcline[ngnum] = mbuf;
  84.       }
  85.   
  86.