[comp.sources.bugs] More Elm problems, this time in patch 10

syd@dsinc.DSI.COM (Syd Weinstein) (12/20/90)

It appears I cannot win.... Elm 2.3 pl 10 has a problem in newalias.
	From: dws@cs.wisc.edu (DaviD W. Sanderson)
	Subject: elm patch10 breaks newalias

	I upgraded to patchlevel 10 of elm2.3 today and discovered that the
	patch broke newalias.  The reason is that the new check in newalias.c
	for checking that there are exactly two equal signs in an alias leaves
	the variable j nonzero.  Subsequent code assumed j was zero, resulting
	in an alias file with no addresses (not too useful).
	Here is the fix I applied:

	--------------------------------------------------------------------
	*** utils/newalias.c0	Wed Dec 19 17:41:52 1990
	--- utils/newalias.c	Wed Dec 19 19:33:44 1990
	***************
	*** 255,261 ****
		  aliases[i] = buffer[i];
		aliases[i] = '\0';
	  
	! 	for (i=strlen(buffer)-1; buffer[i] != '=' && i > 0; i--)
		  address[j++] = buffer[i];
		address[j] = '\0';
	  
	--- 255,261 ----
		  aliases[i] = buffer[i];
		aliases[i] = '\0';
	  
	! 	for (i=strlen(buffer)-1, j=0; buffer[i] != '=' && i > 0; i--)
		  address[j++] = buffer[i];
		address[j] = '\0';
  
Unfortunately I don't run Elm 2.3 but Elm 2.4d, and 2.4d uses
a different newalias, so this slipped through.  I have not looked
at this patch, and have not blessed it in any way.  However,
I doubt their will be a patch 11 before 1/1 so be aware of the problem.
-- 
=====================================================================
Sydney S. Weinstein, CDP, CCP                   Elm Coordinator
Datacomp Systems, Inc.                          Voice: (215) 947-9900
syd@DSI.COM or dsinc!syd                        FAX:   (215) 938-0235