From owner-freebsd-audit Sun Jul 14 15:56:22 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 00F0A37B400 for ; Sun, 14 Jul 2002 15:56:21 -0700 (PDT) Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F99243E64 for ; Sun, 14 Jul 2002 15:56:20 -0700 (PDT) (envelope-from keramida@FreeBSD.org) Received: from hades.hell.gr (patr530-a146.otenet.gr [212.205.215.146]) by mailsrv.otenet.gr (8.12.4/8.12.4) with ESMTP id g6EMuHPY022138 for ; Mon, 15 Jul 2002 01:56:18 +0300 (EEST) Received: from hades.hell.gr (hades [127.0.0.1]) by hades.hell.gr (8.12.5/8.12.5) with ESMTP id g6EMsuft041568 for ; Mon, 15 Jul 2002 01:54:56 +0300 (EEST) (envelope-from keramida@FreeBSD.org) Received: (from charon@localhost) by hades.hell.gr (8.12.5/8.12.5/Submit) id g6EMsuH1041560 for freebsd-audit@freebsd.org; Mon, 15 Jul 2002 01:54:56 +0300 (EEST) (envelope-from keramida@FreeBSD.org) Date: Mon, 15 Jul 2002 01:53:35 +0300 From: Giorgos Keramidas To: freebsd-audit@FreeBSD.org Subject: bin/ln & WARNS=5 Message-ID: <20020714225335.GA41543@hades.hell.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: FreeBSD 5.0-CURRENT i386 X-PGP-Fingerprint: C1EB 0653 DB8B A557 3829 00F9 D60F 941A 3186 03B6 X-Phone: +30-944-116520 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG The following allows me to build bin/ln with WARNS=5 on i386. Does it look OK, or have I missed something important? %%% Index: ln.c =================================================================== RCS file: /home/ncvs/src/bin/ln/ln.c,v retrieving revision 1.28 diff -u -r1.28 ln.c --- ln.c 30 Jun 2002 05:13:54 -0000 1.28 +++ ln.c 14 Jul 2002 22:42:49 -0000 @@ -189,7 +189,7 @@ p = target; else ++p; - if (snprintf(path, sizeof(path), "%s/%s", source, p) >= + if ((size_t)snprintf(path, sizeof(path), "%s/%s", source, p) >= sizeof(path)) { errno = ENAMETOOLONG; warn("%s", target); %%% To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message