[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: heap-use-after-free in rpl_glob
From: |
Bruno Haible |
Subject: |
Re: heap-use-after-free in rpl_glob |
Date: |
Fri, 17 Jan 2020 22:00:35 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-171-generic; KDE/5.18.0; x86_64; ; ) |
Hi Paul,
> It seems that your patch is incomplete, as there's a memory leak in the
> unlikely case that the malloc call fails.
Oops, indeed. Thanks for the review!
> Something like the attached patch instead, perhaps?
Hmm, this patch is freeing the same object through the variable 'dirname'
on one branch and through the variable 'previous_dirname' on the other
branch. A bit hard to understand, and thus likely to introduce more bugs
in the future, I would say. I prefer the attached one. Pushed.
Bruno
0001-glob-Fix-use-after-free-bug.patch
Description: Text Data