From owner-dev-commits-src-all@freebsd.org Wed Feb 3 06:56:11 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 133FC52D57B; Wed, 3 Feb 2021 06:56:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DVssR05VHz3h9y; Wed, 3 Feb 2021 06:56:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EA9171CAC0; Wed, 3 Feb 2021 06:56:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1136uAaP000930; Wed, 3 Feb 2021 06:56:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1136uA5R000929; Wed, 3 Feb 2021 06:56:10 GMT (envelope-from git) Date: Wed, 3 Feb 2021 06:56:10 GMT Message-Id: <202102030656.1136uA5R000929@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: e3cd8246c756 - stable/13 - lualoader: position hyphens at the beginning of character classes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e3cd8246c756e568956da1ad8e90e1983d9af89f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2021 06:56:11 -0000 The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=e3cd8246c756e568956da1ad8e90e1983d9af89f commit e3cd8246c756e568956da1ad8e90e1983d9af89f Author: Kyle Evans AuthorDate: 2021-01-31 15:51:39 +0000 Commit: Kyle Evans CommitDate: 2021-02-03 06:55:51 +0000 lualoader: position hyphens at the beginning of character classes According to the Lua 5.4 manual section 6.4.1 ("Patterns"), the interaction between ranges and classes is not defined and hyphens must be specified at either the beginning or the end of a set if they are not escaped. Move all such occurrences to the beginning. (cherry picked from commit b24872cf7b13314669ed2136c0262bb2eb007695) --- stand/lua/config.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stand/lua/config.lua b/stand/lua/config.lua index f569b2e00b76..9ef7c0796f46 100644 --- a/stand/lua/config.lua +++ b/stand/lua/config.lua @@ -62,10 +62,10 @@ local MSG_FAILSYN_EOLESC = "Stray escape at end of line" local MSG_FAILSYN_EOLVAR = "Unescaped $ at end of line" local MSG_FAILSYN_BADVAR = "Malformed variable expression at position '%d'" -local MODULEEXPR = '([%w-_]+)' +local MODULEEXPR = '([-%w_]+)' local QVALEXPR = '"(.*)"' local QVALREPL = QVALEXPR:gsub('%%', '%%%%') -local WORDEXPR = "([%w%d-][%w%d-_.]*)" +local WORDEXPR = "([-%w%d][-%w%d_.]*)" local WORDREPL = WORDEXPR:gsub('%%', '%%%%') -- Entries that should never make it into the environment; each one should have @@ -182,7 +182,7 @@ local function processEnvVar(value) -- Skip the $ vinit = i + 1 vdelim = nil - vpat = "^([%w][%w%d-_.]*)" + vpat = "^([%w][-%w%d_.]*)" end local name = value:match(vpat, vinit) @@ -346,7 +346,7 @@ local function getBlacklist() return blacklist end - for mod in blacklist_str:gmatch("[;, ]?([%w-_]+)[;, ]?") do + for mod in blacklist_str:gmatch("[;, ]?([-%w_]+)[;, ]?") do blacklist[mod] = true end return blacklist