home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / rcs / sources / cvs.bug < prev    next >
Internet Message Format  |  1991-06-08  |  3KB

  1. From: lowell@tc.fluke.COM (Lowell Skoog)
  2. Newsgroups: comp.sources.bugs
  3. Subject: CVS 1.2 bug: CVS commit dumps core on long file lists
  4. Date: 29 May 91 20:41:40 GMT
  5. Organization: John Fluke Mfg. Co., Inc., Everett, WA
  6.  
  7. Symptom:
  8.     When committing a large number of files (the list of file names
  9.     exceeds 1000 characters), CVS dumps core before putting the user
  10.     in an editor to enter a log message.
  11.  
  12. Work-around:
  13.     Avoid using `cvs commit -a' when many files need to be
  14.     committed.  Instead, commit the files in smaller groups.
  15.  
  16. Cause:
  17.     During the commit process, CVS collects lists of all files that
  18.     have been modified, added, removed, etc.  It puts these lists in
  19.     a temporary file then allows the user to enter a log message.
  20.     When creating the temporary file, CVS uses the fmt() function to
  21.     break up the file lists into reasonable sized lines to avoid line
  22.     wrap.  Unfortunately, the fmt() function provides space (in a
  23.     fixed array) for a line of length MAXLINELEN (1000 bytes), while
  24.     each list can be of length MAXLISTLEN (20000 bytes).  So, the
  25.     potential length of a file list is longer than fmt() can handle.
  26.  
  27. Solution:
  28.     Change the "line" array in fmt() to be of size MAXLISTLEN.
  29.  
  30. A patch file is attached below.  A copy of this message has been sent
  31. to berliner@sun.com.
  32.  
  33. ----------------------------------------------------------------------
  34. Lowell Skoog  M/S 223B                             lowell@tc.fluke.COM
  35. John Fluke Mfg. Co. Inc.  {uunet,uw-beaver,microsoft,sun}!fluke!lowell
  36. P.O. Box 9090
  37. Everett, WA, USA  98206-9090                            (206) 356-5283
  38. ----------------------------------------------------------------------
  39.  
  40. diff -c cvs/src/commit.c:1.1.1.1 cvs/src/commit.c:1.3
  41. *** cvs/src/commit.c:1.1.1.1    Wed May 29 13:33:03 1991
  42. --- cvs/src/commit.c    Wed May 29 13:33:03 1991
  43. ***************
  44. *** 1,5 ****
  45.   #ifndef lint
  46. ! static char rcsid[] = "$Id: commit.c,v 1.1.1.1 1991/02/22 16:33:40 lowell Exp $";
  47.   #endif !lint
  48.  
  49.   /*
  50. --- 1,5 ----
  51.   #ifndef lint
  52. ! static char rcsid[] = "$Id: commit.c,v 1.3 1991/05/29 19:41:40 lowell Exp $";
  53.   #endif !lint
  54.  
  55.   /*
  56. ***************
  57. *** 517,523 ****
  58.       char *instring;
  59.       char *prefix;
  60.   {
  61. !     char line[MAXLINELEN];
  62.       char *cp;
  63.       int col;
  64.  
  65. --- 517,523 ----
  66.       char *instring;
  67.       char *prefix;
  68.   {
  69. !     char line[MAXLISTLEN];    /* UNOFFICIAL bug fix, was MAXLINELEN */
  70.       char *cp;
  71.       int col;
  72.