From eb900ded42e95632bcc06f3b19238c9222c2ba8c Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Thu, 9 Jun 2022 22:27:32 -0400 Subject: [PATCH] refind: Fix possible NULL dereference This was observed with U-Boot. See the upstream change. - https://sourceforge.net/p/refind/code/merge-requests/45/ --- pkgs/tools/bootloaders/refind/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/bootloaders/refind/default.nix b/pkgs/tools/bootloaders/refind/default.nix index 8d46197214c0..2381402534e1 100644 --- a/pkgs/tools/bootloaders/refind/default.nix +++ b/pkgs/tools/bootloaders/refind/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, gnu-efi, nixosTests }: +{ lib, stdenv, fetchurl, fetchpatch, gnu-efi, nixosTests }: let archids = { @@ -24,6 +24,13 @@ stdenv.mkDerivation rec { patches = [ # Removes hardcoded toolchain for aarch64, allowing successful aarch64 builds. ./0001-toolchain.patch + + # Fixes issue with null dereference in ReadHiddenTags + # Upstream: https://sourceforge.net/p/refind/code/merge-requests/45/ + (fetchpatch { + url = "https://github.com/samueldr/rEFInd/commit/29cd79dedabf84d5ddfe686f5692278cae6cc4d6.patch"; + sha256 = "sha256-/jAmOwvMmFWazyukN+ru1tQDiIBtgGk/e/pczsl1Xc8="; + }) ]; buildInputs = [ gnu-efi ];