summaryrefslogtreecommitdiffstats
path: root/grub-core/lib/gnulib-patches/fix-regexec-null-deref.patch
diff options
context:
space:
mode:
Diffstat (limited to 'grub-core/lib/gnulib-patches/fix-regexec-null-deref.patch')
-rw-r--r--grub-core/lib/gnulib-patches/fix-regexec-null-deref.patch12
1 files changed, 12 insertions, 0 deletions
diff --git a/grub-core/lib/gnulib-patches/fix-regexec-null-deref.patch b/grub-core/lib/gnulib-patches/fix-regexec-null-deref.patch
new file mode 100644
index 0000000..db6dac9
--- /dev/null
+++ b/grub-core/lib/gnulib-patches/fix-regexec-null-deref.patch
@@ -0,0 +1,12 @@
+--- a/lib/regexec.c 2020-10-21 14:25:35.310195912 +0000
++++ b/lib/regexec.c 2020-11-05 10:55:09.621542984 +0000
+@@ -1692,6 +1692,9 @@
+ {
+ Idx top = mctx->state_log_top;
+
++ if (mctx->state_log == NULL)
++ return REG_NOERROR;
++
+ if ((next_state_log_idx >= mctx->input.bufs_len
+ && mctx->input.bufs_len < mctx->input.len)
+ || (next_state_log_idx >= mctx->input.valid_len