[4278] in Athena Bugs

home help back first fref pref prev next nref lref last post

vax 6.4R: /usr/athena/finger

daemon@ATHENA.MIT.EDU (Jonathan I. Kamens)
Wed Feb 21 14:52:15 1990

Date: Wed, 21 Feb 90 14:51:49 -0500
From: Jonathan I. Kamens <jik@PIT-MANAGER.MIT.EDU>
To: bugs@ATHENA.MIT.EDU
System name:		navigator
Type and version:	CVAXSTAR 6.4R
Display type:		SM

What were you trying to do?
	View a .plan file with control characters in it using
	/usr/athena/finger.


What's wrong:
	/usr/athena/finger attempts to mask out any control characters
	by masking out the bit in each character it displays that
	makes the character a control character.  It *tries* to do
	this by exclusive-or'ing each character with the constant
	"100".

What should have happened:
	That constant should actually be OCTAL 100, which should be
	expressed as "0100" in the source file.  This bug is present
	in /usr/athena/finger, /usr/ucb/finger, and the 4.3tahoe
	version of finger.

Please describe any relevant documentation references:
	See my next bug report, which will be a patch to
	/usr/ucb/finger for the same problem.  The patch below is for
	/usr/athena/finger.

*** /source/athena/usr.athena/finger/finger.c	Thu Feb  9 19:33:27 1989
--- finger.c	Wed Feb 21 14:46:41 1990
***************
*** 585,591 ****
  						if (isprint(c) || isspace(c))
  							(void) putchar(c);
  						else
! 							(void) putchar(c ^ 100);
  					}
  					(void) fclose(fp);
  					(void) putchar('\n');
--- 585,591 ----
  						if (isprint(c) || isspace(c))
  							(void) putchar(c);
  						else
! 							(void) putchar(c ^ 0100);
  					}
  					(void) fclose(fp);
  					(void) putchar('\n');
***************
*** 616,622 ****
  								if (isprint(c) || isspace(c))
  									(void) putchar(c);
  								else
! 									(void) putchar(c ^ 100);
  								okay = 0;
  							}
  						}
--- 616,622 ----
  								if (isprint(c) || isspace(c))
  									(void) putchar(c);
  								else
! 									(void) putchar(c ^ 0100);
  								okay = 0;
  							}
  						}
***************
*** 623,629 ****
  						else if (isprint(c) || isspace(c))
  							(void) putchar(c);
  						else
! 							(void) putchar(c ^ 100);
  						i++;
  					}
  					(void) fclose(fp);
--- 623,629 ----
  						else if (isprint(c) || isspace(c))
  							(void) putchar(c);
  						else
! 							(void) putchar(c ^ 0100);
  						i++;
  					}
  					(void) fclose(fp);
***************
*** 1416,1422 ****
  		if (isprint(c) || isspace(c))
  			(void) putchar(c);
  		else
! 			(void) putchar(c ^ 100);
  	}
  	if (lastc != '\n')
  		(void) putchar('\n');
--- 1416,1422 ----
  		if (isprint(c) || isspace(c))
  			(void) putchar(c);
  		else
! 			(void) putchar(c ^ 0100);
  	}
  	if (lastc != '\n')
  		(void) putchar('\n');


home help back first fref pref prev next nref lref last post