mirror of
https://git.proxmox.com/git/grub2
synced 2025-07-20 11:09:45 +00:00

It appears to be possible that the mctx->state_log field may be NULL, and the name of this function, clean_state_log_if_needed(), suggests that it should be checking that it is valid to be cleaned before assuming that it does. Fixes: CID 86720 Signed-off-by: Darren Kenny <darren.kenny@oracle.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
13 lines
388 B
Diff
13 lines
388 B
Diff
--- 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
|