[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-patch] Broken patch commit: don't warn twice about the same inv
From: |
Andreas Grünbacher |
Subject: |
Re: [bug-patch] Broken patch commit: don't warn twice about the same invalid file name |
Date: |
Fri, 6 Apr 2012 15:06:47 +0200 |
Jean,
Am 6. April 2012 14:09 schrieb Jean Delvare <address@hidden>:
> This commit [...] is broken.
> bad[] holds pointers to the name strings, and these get freed
> when switching to the next hunk in the patch file (if I read the code
> properly...) So you end up accessing freed memory. Valgrind complains
> about that and the code will eventually fail, as was reported by an
> openSUSE user:
>
> https://bugzilla.novell.com/show_bug.cgi?id=755136
>
> I don't think the code even actually does what it is supposed to, as it
> can only store 2 bad names (the slots are never freed), while a given
> patch file could contain a lot more.
Thanks. We are actually only interested in each patch here, not in all the
patches that could be in the same input file. How about the attached change
for a fix?
Andreas
0001-Fix-use-after-free-bug-in-name_is_valid.patch
Description: Text Data
Re: [bug-patch] Broken patch commit: don't warn twice about the same invalid file name, Jim Meyering, 2012/04/06
Re: [bug-patch] Broken patch commit: don't warn twice about the same invalid file name, Jean Delvare, 2012/04/10