Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2006/0128/14

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


8-bit safety in tbl.
 [rsc] --rw-rw-r-- M 1428987 glenda sys 1414 Jan 28 10:55 sys/src/cmd/tbl/tc.c
	/n/sourcesdump/2006/0128/plan9/sys/src/cmd/tbl/tc.c:22,33 - 
	/n/sourcesdump/2006/0129/plan9/sys/src/cmd/tbl/tc.c:22,39
	  				continue;
	  			s = table[ilin][icol].col;
	  			if (point(s))
	- 				while (*s)
	- 					had[*s++] = 1;
	+  				while (*s) {
	+  					if((unsigned char)*s < 128)
	+  						had[(unsigned char)*s] = 1;
	+  					s++;
	+  				}
	  			s = table[ilin][icol].rcol;
	  			if (point(s))
	- 				while (*s)
	- 					had[*s++] = 1;
	+  				while (*s) {
	+  					if((unsigned char)*s < 128)
	+  						had[(unsigned char)*s] = 1;
	+  					s++;
	+  				}
	  		}
	  	}
	  				/* choose first funny character */


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].