From owner-freebsd-current@FreeBSD.ORG Mon Jun 9 05:33:16 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4092637B401; Mon, 9 Jun 2003 05:33:16 -0700 (PDT) Received: from open.nlnetlabs.nl (open.nlnetlabs.nl [213.154.224.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id F03F343FE9; Mon, 9 Jun 2003 05:33:12 -0700 (PDT) (envelope-from ted@open.nlnetlabs.nl) Received: from open.nlnetlabs.nl (localhost [127.0.0.1]) by open.nlnetlabs.nl (8.12.8p1/8.12.6) with ESMTP id h59CXBvr009835; Mon, 9 Jun 2003 14:33:11 +0200 (CEST) (envelope-from ted@open.nlnetlabs.nl) Received: (from ted@localhost) by open.nlnetlabs.nl (8.12.8p1/8.12.8/Submit) id h59CXBeC009834; Mon, 9 Jun 2003 14:33:11 +0200 (CEST) Message-Id: <200306091233.h59CXBeC009834@open.nlnetlabs.nl> From: ted@NLnetLabs.nl (Ted Lindgreen) Date: Mon, 9 Jun 2003 14:33:11 +0200 In-Reply-To: "Alexander Leidinger's message as of Jun 9, 11:23" X-Mailer: Mail User's Shell (7.2.6 beta(5) 10/07/98) To: netchild@freebsd.org, ted@nlnetlabs.nl (Ted Lindgreen) cc: ports@freebsd.org cc: deischen@freebsd.org cc: freebsd-current@freebsd.org cc: avleeuwen@piwebs.com cc: rwatson@freebsd.org cc: lioux@freebsd.org Subject: Re: Re Regression: Playing QT files from mplayer stopped working in 5.1 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2003 12:33:16 -0000 [Quoting Alexander Leidinger, on Jun 9, 11:23, in "Re: Re Regression: P ..."] > > shouldn't _close in uthread_close.c do some sanity check on "fd" > > before using it as an array index? > > Try the attached patch. .... > + if ((fd < 0) || (fd >= _thread_dtablesize) || This test looks perfectly right (should have been here already when the "_thread_fd_table[fd]" reference was added, I guess). I've tested it as cleanly as possible (make update, apply patch, make world/kernel, and portupgrade -f multimedia/mplayer). Is works fine and I haven't found any complications. I think it's save to commit. Thanks and regards, -- ted