bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/3] lib/regexec: Fix possible null-dereference


From: Paul Eggert
Subject: Re: [PATCH 1/3] lib/regexec: Fix possible null-dereference
Date: Tue, 24 Aug 2021 11:52:00 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 8/24/21 8:11 AM, Darren Kenny wrote:

Is there a specific set of assertions already present that ensure that
the circumstances you outline above are always in place?

If by "assertion" you mean using DEBUG_ASSERT to pacify Coverity, I think that the answer is currently "no" but if you apply something like the attached patch then the answer becomes "yes". You'll have to check this though, as Coverity won't give me access to its tools or source code.

If by "assertion" you mean using <assert.h> to verify each of the statements I made, then this is not the sort of thing that one can easily ensure via assertions. It'd be like asking "Is there a specific set of <assert.h> assertions that I can add to 'grep' to ensure that the output of 'grep' is correct?" The answer to that question is "No, there's no practical way to do it."
At present at least, we're not building GRUB with DEBUG, but maybe it is
something to consider for Coverity builds.

With the attached patch, I hope your Coverity builds can be either with or without DEBUG.

Attachment: coverity3.diff
Description: Text Data


reply via email to

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