Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 May 2001 12:57:12 -0500
From:      "Jacques A. Vidrine" <n@nectar.com>
To:        Kris Kennaway <kris@obsecurity.org>
Cc:        audit@FreeBSD.org
Subject:   Re: dd BDECFLAGS cleanup
Message-ID:  <20010520125712.B22932@spawn.nectar.com>
In-Reply-To: <20010519213137.A13195@xor.obsecurity.org>; from kris@obsecurity.org on Sat, May 19, 2001 at 09:31:37PM -0700
References:  <20010519213137.A13195@xor.obsecurity.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, May 19, 2001 at 09:31:37PM -0700, Kris Kennaway wrote:
> ===================================================================
> RCS file: /home/ncvs/src/bin/dd/args.c,v
> retrieving revision 1.27
> diff -u -r1.27 args.c
> --- args.c	2000/10/22 23:00:32	1.27
> +++ args.c	2001/05/20 04:22:30
> @@ -168,8 +168,8 @@
>  	/*
>  	 * Bail out if the calculation of a file offset would overflow.
>  	 */
> -	if (in.offset > QUAD_MAX / in.dbsz || out.offset > QUAD_MAX / out.dbsz)
> -		errx(1, "seek offsets cannot be larger than %qd", QUAD_MAX);
> +	if ((unsigned long long)in.offset > QUAD_MAX / in.dbsz || (unsigned long long)out.offset > QUAD_MAX / out.dbsz)
> +		errx(1, "seek offsets cannot be larger than %lld", (long long)QUAD_MAX);
>  }
>  
>  static int

How about `(off_t)in.dbsz' and so  on instead? There is no `long long'
in C89,  though there  is in  C99.  Are  we leaving  C89 compatibility
already?  On the other  hand, I don't know what to  do with the format
strings.

Cheers,
-- 
Jacques Vidrine / n@nectar.com / jvidrine@verio.net / nectar@FreeBSD.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010520125712.B22932>