diff options
author | Christian Breunig <christian@breunig.cc> | 2025-07-06 22:45:39 +0200 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2025-07-07 19:44:23 +0200 |
commit | 7c1e9cc39ab56632cc981e9fbd4a9e6dc2fe7122 (patch) | |
tree | 7fb34336893e96e9e4c75cd63e0d4ded35f72f37 /debian/patches/test-mock-variables-explicitly-skip-CONFIG_ONLY-vars.patch | |
parent | 02acad285c74015e8120ade2b41d51b39ae66b63 (diff) | |
download | efi-boot-shim-vyos/current.tar.gz efi-boot-shim-vyos/current.zip |
T861: add VyOS UEFI CA alongside Debian UEFI CAHEADvyos/current
Diffstat (limited to 'debian/patches/test-mock-variables-explicitly-skip-CONFIG_ONLY-vars.patch')
-rw-r--r-- | debian/patches/test-mock-variables-explicitly-skip-CONFIG_ONLY-vars.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/debian/patches/test-mock-variables-explicitly-skip-CONFIG_ONLY-vars.patch b/debian/patches/test-mock-variables-explicitly-skip-CONFIG_ONLY-vars.patch new file mode 100644 index 00000000..3ca5b967 --- /dev/null +++ b/debian/patches/test-mock-variables-explicitly-skip-CONFIG_ONLY-vars.patch @@ -0,0 +1,45 @@ +From: =?utf-8?q?Fabian_Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com> +Date: Mon, 24 Mar 2025 12:58:56 +0100 +Subject: test-mock-variables: explicitly skip CONFIG_ONLY vars +MIME-Version: 1.0 +Content-Type: text/plain; charset="utf-8" +Content-Transfer-Encoding: 8bit + +otherwise we might pass invalid pointers to load_variables and cause +segfaults in test cases. + +Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> +--- +Submitted upstream: https://github.com/rhboot/shim/pull/739/ + + test-mock-variables.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/test-mock-variables.c b/test-mock-variables.c +index f869300..dd4a9eb 100644 +--- a/test-mock-variables.c ++++ b/test-mock-variables.c +@@ -212,8 +212,10 @@ test_gnvn_helper(char *testvars) + * mok mirroring that aren't really from mok; right now + * this is a reasonable heuristic for that. + */ +- if (mok_state_variables[i].flags & MOK_VARIABLE_CONFIG_ONLY) ++ if (mok_state_variables[i].flags & MOK_VARIABLE_CONFIG_ONLY) { ++ mok_rt_vars[i] = ""; + continue; ++ } + mok_rt_vars[i] = mok_state_variables[i].rtname8; + } + +@@ -313,8 +315,10 @@ test_get_variable_0(void) + * mok mirroring that aren't really from mok; right now + * this is a reasonable heuristic for that. + */ +- if (mok_state_variables[i].flags & MOK_VARIABLE_CONFIG_ONLY) ++ if (mok_state_variables[i].flags & MOK_VARIABLE_CONFIG_ONLY) { ++ mok_rt_vars[i] = ""; + continue; ++ } + mok_rt_vars[i] = mok_state_variables[i].rtname8; + } + |