Re: [PATCH] dir: fix malloc of root untracked_cache_dir
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Feb 24, 2021, 16:56 UTC
- Message-ID
- <YDaFKSLawYyWhg5x@nand.local>
- In-Reply-To
- <pull.884.git.1614177117508.gitgitgadget@gmail.com>
On Wed, Feb 24, 2021 at 02:31:57PM +0000, Jeff Hostetler via GitGitGadget wrote:
Show 7 quoted lines
> From: Jeff Hostetler <jeffhost@microsoft.com> > > Use FLEX_ALLOC_STR() to allocate the `struct untracked_cache_dir` > for the root directory. Get rid of unsafe code that might fail to > initialize the `name` field (if FLEX_ARRAY is not 1). This will > make it clear that we intend to have a structure with an empty > string following it.
I had to read this patch message a few times over to make sure that I wasn't missing something in the patch itself, but it looks all good to me.
Reviewed-by: Taylor Blau <me@ttaylorr.com>
Thanks, Taylor