Re: [PATCH v3] bugreport.c: fix a crash in `git bugreport` with `--no-suffix` option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <barroit@xxxxxxxxx>
> ---

    Acked-by: Taylor Blau <me@xxxxxxxxxxxx>

Thanks,
Taylor




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux