From owner-cvs-src-old@FreeBSD.ORG Thu Nov 12 00:52:37 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 949E4106566B for ; Thu, 12 Nov 2009 00:52:37 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 82E498FC0C for ; Thu, 12 Nov 2009 00:52:37 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id nAC0qbkI062760 for ; Thu, 12 Nov 2009 00:52:37 GMT (envelope-from attilio@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id nAC0qb48062759 for cvs-src-old@freebsd.org; Thu, 12 Nov 2009 00:52:37 GMT (envelope-from attilio@repoman.freebsd.org) Message-Id: <200911120052.nAC0qb48062759@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to attilio@repoman.freebsd.org using -f From: Attilio Rao Date: Thu, 12 Nov 2009 00:52:14 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern subr_bus.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Nov 2009 00:52:37 -0000 attilio 2009-11-12 00:52:14 UTC FreeBSD src repository Modified files: sys/kern subr_bus.c Log: SVN rev 199209 on 2009-11-12 00:52:14Z by attilio The building the dev nameunit string, in devclass_add_device() is based on the assumption that the unit linked with the device is invariant but that can change when calling devclass_alloc_unit() (because -1 is passed or, more simply, because the unit choosen is beyond the table limits). This results in a completely bogus string building. Fix this by reserving the necessary room for all the possible characters printable by a positive integer (we do not allow for negative unit number). Reported by: Sandvine Incorporated Reviewed by: emaste Sponsored by: Sandvine Incorporated MFC: 1 week Revision Changes Path 1.235 +2 -1 src/sys/kern/subr_bus.c