From: Taylor Blau Date: Sat, 16 Mar 2024 01:56:34 GMT Subject: Re: [PATCH v3] bugreport.c: fix a crash in `git bugreport` with `--no-suffix` option Message-ID: In-Reply-To: <20240314223406.79283-1-barroit@linux.com> On Fri, Mar 15, 2024 at 07:34:06AM +0900, Jiamu Sun wrote: > executing `git bugreport --no-suffix` led to a segmentation fault > due to strbuf_addftime() being called with a NULL option_suffix > variable. This occurs because negating the "--[no-]suffix" option > causes the parser to set option_suffix to NULL, which is not > handled prior to calling strbuf_addftime(). > > By adding a NULL check, the `--no-suffix` option is now available. > Using this option disables the suffix, and the file is just named > `git-bugreport` without any disambiguation measure. > > Signed-off-by: Jiamu Sun > --- Acked-by: Taylor Blau Thanks, Taylor