From owner-svn-src-all@freebsd.org Fri Jan 26 09:38:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C17DECC60D; Fri, 26 Jan 2018 09:38:41 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1F2916B512; Fri, 26 Jan 2018 09:38:41 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0BD2519E31; Fri, 26 Jan 2018 09:38:41 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0Q9ceDN054854; Fri, 26 Jan 2018 09:38:40 GMT (envelope-from wma@FreeBSD.org) Received: (from wma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0Q9cebW054853; Fri, 26 Jan 2018 09:38:40 GMT (envelope-from wma@FreeBSD.org) Message-Id: <201801260938.w0Q9cebW054853@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wma set sender to wma@FreeBSD.org using -f From: Wojciech Macek Date: Fri, 26 Jan 2018 09:38:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328435 - head/sys/powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: wma X-SVN-Commit-Paths: head/sys/powerpc/powerpc X-SVN-Commit-Revision: 328435 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jan 2018 09:38:41 -0000 Author: wma Date: Fri Jan 26 09:38:40 2018 New Revision: 328435 URL: https://svnweb.freebsd.org/changeset/base/328435 Log: PPC: Add place for NULL chars in intrnames In a corner case we could fall into OOB error. Authored by: Patryk Duda Submitted by: Wojciech Macek Obtained from: Semihalf Sponsored by: IBM, QCM Technologies Modified: head/sys/powerpc/powerpc/intr_machdep.c Modified: head/sys/powerpc/powerpc/intr_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/intr_machdep.c Fri Jan 26 08:52:28 2018 (r328434) +++ head/sys/powerpc/powerpc/intr_machdep.c Fri Jan 26 09:38:40 2018 (r328435) @@ -130,7 +130,7 @@ static u_int nirqs = 0; /* Allocated IRQs. */ static u_int stray_count; u_long intrcnt[INTR_VECTORS]; -char intrnames[INTR_VECTORS * MAXCOMLEN]; +char intrnames[INTR_VECTORS * (MAXCOMLEN + 1)]; size_t sintrcnt = sizeof(intrcnt); size_t sintrnames = sizeof(intrnames);