[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 02/10] gnulib/regexec: Fix possible null-dereference
From: |
Robbie Harwood |
Subject: |
Re: [PATCH v2 02/10] gnulib/regexec: Fix possible null-dereference |
Date: |
Tue, 07 Dec 2021 12:38:13 -0500 |
Paul Eggert <eggert@cs.ucla.edu> writes:
> On 12/1/21 13:01, Robbie Harwood wrote:
>> It appears to be possible that the mctx->state_log field may be NULL,
>
> I don't see how. re_search_internal sets mctx.state_log to a non-null
> value if dfa->has_mb_node, and clean_state_log_if_needed should be
> called only if dfa->has_mb_node is true. What am I missing?
Having a CID number means this is fixing a Coverity issue. I don't have
access to that, so maybe Darren/Daniel can provide more information
here.
My *guess* is that Coverity has noticed that `mctx->state_log` is
checked against NULL in many other places in that file, and was unable
to prove to itself that it couldn't be NULL there too. If that's the
case, a DEBUG_ASSERT would presumably do the trick better.
Be well,
--Robbie
signature.asc
Description: PGP signature
- Re: [PATCH v2 01/10] argp-parse.c (__argp_input): Don't crash if pstate is NULL, (continued)
[PATCH v2 04/10] Fix width computation, Robbie Harwood, 2021/12/01
[PATCH v2 03/10] gnulib/regexec: Resolve unused variable, Robbie Harwood, 2021/12/01
[PATCH v2 02/10] gnulib/regexec: Fix possible null-dereference, Robbie Harwood, 2021/12/01
[PATCH v2 05/10] Make gnulib's regcomp not abort(), Robbie Harwood, 2021/12/01
[PATCH v2 06/10] Make CFLAGS less painful, Robbie Harwood, 2021/12/01
[PATCH v2 07/10] Fix __argp_fmtstream_point()'s return type and comparisons with it, Robbie Harwood, 2021/12/01