bug in pathalias (and fix)

ekrell at ucla-cs.UUCP ekrell at ucla-cs.UUCP
Sat Feb 23 10:38:21 AEST 1985


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 at 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 at 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 at ucla-locus.arpa      ..!{sdcrdcf,ihnp4,trwspp,ucbvax}!ucla-cs!ekrell



More information about the Net.bugs mailing list