[net.sources.bugs] bug in pathalias

ekrell@ucla-cs.UUCP (02/23/85)

I found this problem when I introduced the csnet sites to the database
used by pathalias: the address for waterloo was stored as
"%s%%waterloo.csnet@csnet-relay.arpa" which works ok since the %% gets
translated into one % by sprintf(). The problem was in the address for
utzoo which was "utzoo!%s%waterloo.csnet@csnet-relay.arpa" (note only one
% here). When this was used by sprintf(), the % simply dissapeared.
  The problem was in pathprintf() in mapit.c. Here's a context diff bug fix:

*** mapit.c.old	Fri Feb 22 16:26:50 1985
--- mapit.c	Fri Feb 22 16:28:06 1985
***************
*** 370,375
  				break;
  			case '%':
  				*++buf = *++path;
  				break;
  			}
  		} else

--- 370,376 -----
  				break;
  			case '%':
  				*++buf = *++path;
+ 				buf++;
  				break;
  			}
  		} else
-- 
    Eduardo Krell               UCLA Computer Science Department
    ekrell@ucla-locus.arpa      ..!{sdcrdcf,ihnp4,trwspp,ucbvax}!ucla-cs!ekrell