Date: Thu, 04 Jun 2026 21:15:42 +0000 From: Baptiste Daroussin <bapt@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 57807f389a9e - main - nuageinit: add nil/empty guard to decode_base64() Message-ID: <6a21eafe.3ce3f.5abbe251@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=57807f389a9e42774d944e256b499f5fd82ff855 commit 57807f389a9e42774d944e256b499f5fd82ff855 Author: Baptiste Daroussin <bapt@FreeBSD.org> AuthorDate: 2026-06-04 18:09:06 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2026-06-04 18:09:06 +0000 nuageinit: add nil/empty guard to decode_base64() Return an empty string when input is nil or zero-length instead of processing it through the decoding loop. --- libexec/nuageinit/nuage.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libexec/nuageinit/nuage.lua b/libexec/nuageinit/nuage.lua index 839cf3588021..4f25e79ccefc 100644 --- a/libexec/nuageinit/nuage.lua +++ b/libexec/nuageinit/nuage.lua @@ -20,6 +20,9 @@ local function getlocalbase() end local function decode_base64(input) + if input == nil or #input == 0 then + return "" + end local b = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' input = string.gsub(input, '[^'..b..'=]', '')home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a21eafe.3ce3f.5abbe251>
