[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#32592: heap-use-after-free in regex module
From: |
Jim Meyering |
Subject: |
bug#32592: heap-use-after-free in regex module |
Date: |
Thu, 6 Sep 2018 06:41:41 -0700 |
On Thu, Sep 6, 2018 at 12:18 AM Paul Eggert <address@hidden> wrote:
> Jim Meyering wrote:
> > I couldn't help but notice this nonsense right after the line
> > you inserted:
> >
> > if (err == REG_NOMATCH)
> > continue;
> > }
> >
> > That is an "if (...) continue;" just before the closing brace of a
> > for-loop. Those two lines constitute a no-op and should be removed,
> > though not as part of your change.
>
> Actually I think the abovementioned code should be kept, and the nonsense
> comes
> from the fact that some code is missing after the "if". When err !=
> REG_NOMATCH
> && err != REG_NOERROR, the function should exit the loop and return
> immediately,
> because there is a memory allocation error in a subroutine.
>
> What a coincidence that we would find two bugs right next to each other,
> huh?...
Indeed. Glad you realized that.
- bug#32592: heap-use-after-free in regex module (was: s with i modifier seems to work incorrectly), (continued)
- bug#32592: heap-use-after-free in regex module (was: s with i modifier seems to work incorrectly), Assaf Gordon, 2018/09/05
- bug#32592: heap-use-after-free in regex module, Assaf Gordon, 2018/09/05
- bug#32592: heap-use-after-free in regex module, Jim Meyering, 2018/09/06
- bug#32592: heap-use-after-free in regex module, Paul Eggert, 2018/09/06
- bug#32592: heap-use-after-free in regex module, Assaf Gordon, 2018/09/06
- bug#32592: heap-use-after-free in regex module, Paul Eggert, 2018/09/06
- bug#32592: heap-use-after-free in regex module,
Jim Meyering <=