From owner-cvs-all Mon Feb 28 11:30:35 2000 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id E25C237B8EE; Mon, 28 Feb 2000 11:30:32 -0800 (PST) (envelope-from guido@FreeBSD.org) Received: (from guido@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id LAA46724; Mon, 28 Feb 2000 11:30:27 -0800 (PST) (envelope-from guido@FreeBSD.org) Message-Id: <200002281930.LAA46724@freefall.freebsd.org> From: Guido van Rooij Date: Mon, 28 Feb 2000 11:30:27 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/net if.c Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk guido 2000/02/28 11:30:27 PST Modified files: sys/net if.c Log: This fixes a problem where the SIOCGIFCONF ioctl goes wrong. This is triggered when qmail is used with INET6 enabled. The bug manifests itself in that the space variable can become negative and that in the comparison in the guards of the 2 loops, this was not noticed because sizeof() returns an unsigned and thus the signed variable gets promoted to unsigned. I decided not to make space unsigned because I think we should guard against this from happening. Thus panic() in case space becomes negative. Approved by: jkh Revision Changes Path 1.85 +10 -2 src/sys/net/if.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message