mirror of
				git://git.code.sf.net/p/cdesktopenv/code
				synced 2025-03-09 15:50:02 +00:00 
			
		
		
		
	Enforce integer base limits of 2 to 64 (#139)
src/cmd/ksh93/bltins/typeset.c: b_typeset(): - For integer bases change argnum check to default values that are < 2 or > 64 to 10 instead of allowing invalid base values that ksh cannot process. src/cmd/ksh93/bltins/typeset.c: setall(): - Remove argnum check for integer base of 1 as base cannot be 1. - Relocate strlen(name) to inside of conditional check for np->nvfun as this code does not need to run all. - Remove no-op oldname code src/cmd/ksh93/tests/attributes.sh: - Add typeset -i base bounds checks to default base 10
This commit is contained in:
		
							parent
							
								
									cefec34774
								
							
						
					
					
						commit
						6697edba1c
					
				
					 2 changed files with 10 additions and 8 deletions
				
			
		|  | @ -552,5 +552,13 @@ do	unset foo | |||
| done | ||||
| unset expect | ||||
| 
 | ||||
| unset base | ||||
| for base in 0 1 65 | ||||
| do	unset x | ||||
| 	typeset -i $base x | ||||
| 	[[ $(typeset -p x) == 'typeset -i x' ]] || err_exit "typeset -i base limits failed to default to 10 with base: $base." | ||||
| done | ||||
| unset x base | ||||
| 
 | ||||
| # ====== | ||||
| exit $((Errors<125?Errors:125)) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue