Re: [PATCH 2/2] entry.c: fix possible buffer overflow in remove_subtree()
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Mar 13, 2014, 11:29 UTC
- Message-ID
- <CACsJy8D9FrsZ0FmXZoXGGzqQK7UfE+K39259TjUkTOZp+F5OOA@mail.gmail.com>
- In-Reply-To
- <1394702348-6433-3-git-send-email-mhagger@alum.mit.edu>
On Thu, Mar 13, 2014 at 4:19 PM, Michael Haggerty <mhagger@alum.mit.edu> wrote:
> remove_subtree() manipulated path in a fixed-size buffer even though > the length of the input, let alone the length of entries within the > directory, were not known in advance. Change the function to take a > strbuf argument and use that object as its scratch space.
Converting more PATH_MAX to strbuf could be a micro project. Not sure if we still any more of them though.
The patches look fine btw.
-- Duy