Subject: Re: bin/21058: Teach unexpand -t
To: Martin Weber <Ephaeton@gmx.net>
From: Christian Biere <christianbiere@gmx.de>
List: netbsd-bugs
Date: 04/08/2003 00:35:34
Martin Weber <Ephaeton@gmx.net> wrote:

> +		case 't':
> +			tabsize=(int) strtoul(optarg, &ep, 10);
> +			if (*ep != '\0' || tabsize==0) {
> +				fprintf(stderr, "unexpand: Invalid tabstop
> argument!\n");+				exit(EXIT_FAILURE);
> +			}
> +			break;

You don't check whether strtoul() sets errno to ERANGE and you allow
negative values for tabsize.

-- 
Christian