From owner-svn-src-head@freebsd.org Tue Mar 7 21:40:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4106D014E9; Tue, 7 Mar 2017 21:40:02 +0000 (UTC) (envelope-from cem@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 mx1.freebsd.org (Postfix) with ESMTPS id B15601290; Tue, 7 Mar 2017 21:40:02 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v27Le1ES070699; Tue, 7 Mar 2017 21:40:01 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v27Le1rQ070698; Tue, 7 Mar 2017 21:40:01 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201703072140.v27Le1rQ070698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 7 Mar 2017 21:40:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314882 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Mar 2017 21:40:03 -0000 Author: cem Date: Tue Mar 7 21:40:01 2017 New Revision: 314882 URL: https://svnweb.freebsd.org/changeset/base/314882 Log: ufsread: Use appropriate UFS_MAXNAMLEN constant A follow-up to r313475. Submitted by: Gaurav Gangalwar Sponsored by: Dell EMC Isilon Modified: head/sys/boot/common/ufsread.c Modified: head/sys/boot/common/ufsread.c ============================================================================== --- head/sys/boot/common/ufsread.c Tue Mar 7 20:59:49 2017 (r314881) +++ head/sys/boot/common/ufsread.c Tue Mar 7 21:40:01 2017 (r314882) @@ -121,7 +121,7 @@ fsfind(const char *name, ufs_ino_t * ino static ufs_ino_t lookup(const char *path) { - static char name[MAXNAMLEN + 1]; + static char name[UFS_MAXNAMLEN + 1]; const char *s; ufs_ino_t ino; ssize_t n; @@ -135,7 +135,7 @@ lookup(const char *path) if (!*path) break; for (s = path; *s && *s != '/'; s++); - if ((n = s - path) > MAXNAMLEN) + if ((n = s - path) > UFS_MAXNAMLEN) return 0; ls = *path == '?' && n == 1 && !*s; memcpy(name, path, n);