Thread (2 messages) 2 messages, 2 authors, 2021-02-24

Re: [PATCH] dir: fix malloc of root untracked_cache_dir

flat view

From: Taylor Blau <hidden>
Date: 2021-02-24 16:57:27

On Wed, Feb 24, 2021 at 02:31:57PM +0000, Jeff Hostetler via GitGitGadget wrote:
From: Jeff Hostetler <redacted>

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 [off-list ref]

Thanks,
Taylor
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help