[comp.mail.elm] problems with elm 2.2 PL0, using change folder feature

jeff@cjsa.WA.COM (Jeffery Small) (04/17/89)

Problem 1:	Change folder "=" convention

Description:	When you change folders and accidentally enter a lone  '=',
		Elm opens your mail directory as if it were a folder, finds
		the contents "corrupted" and dies!  Since this is an easy
		error to make, I believe Elm should trap this condition and
		print a message rather than exiting.

		Sorry, no fix included for this one.


Problem 2:	Change folder help message feature

Description:	When you repeatedly 'c'hange folders and use '?' to display
		a list of folder names, the list is preceded by a little
		help message.  The first time this occurs, everything is OK
		but subsequent uses of '?' cause (all but the first line of)
		the message body to be repeated.  The help message grows and
		grows the more you use this feature.

Urgency of fix:	Medium

		What happened is that a pair of braces was left out to
		surround a block of code.  This causes the help message to
		be repeatedly concatenated to the end of the helpmsg[]
		buffer.  If this goes on long enough, you will overflow the
		buffer with unpleasant results.

Fix:		Apply the patch below to quit.c to fix the problem.


------ unofficial patch --------------------------------------------------
*** src/quit.c.orig	Sat Apr 15 20:57:54 1989
--- src/quit.c	Sat Apr 15 20:58:38 1989
***************
*** 99,105
  	    } else if (strcmp(newfile, "?") == 0) {
  
  	      /* user wants to list folders */
! 	      if(!*helpmsg)	/* format helpmsg if not yet done */
  
  		strcpy(helpmsg,
  		  "\n\r\n\rEnter: <nothing> to not change to a new folder,");

--- 99,105 -----
  	    } else if (strcmp(newfile, "?") == 0) {
  
  	      /* user wants to list folders */
! 	      if(!*helpmsg) {	/* format helpmsg if not yet done */
  
  		strcpy(helpmsg,
  		  "\n\r\n\rEnter: <nothing> to not change to a new folder,");
***************
*** 117,123
  		  " (leading '=' denotes your folder directory ");
  		strcat(helpmsg, folders);
  		strcat(helpmsg, ").\n\r");
! 
  	      list_folders(4, helpmsg);
  	      PutLine0(LINES-2,0,"Name of new folder: ");	/* reprompt */
  	      redraw = TRUE;		/* we'll need to clean the screen */

--- 117,123 -----
  		  " (leading '=' denotes your folder directory ");
  		strcat(helpmsg, folders);
  		strcat(helpmsg, ").\n\r");
! 	      }
  	      list_folders(4, helpmsg);
  	      PutLine0(LINES-2,0,"Name of new folder: ");	/* reprompt */
  	      redraw = TRUE;		/* we'll need to clean the screen */

---------- end unofficial patch ---------------------------------