[Top][All Lists]

[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

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,

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]