git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: Jiamu Sun <baiorettohr@gmail.com>
Cc: git@vger.kernel.org, barroit@linux.com
Subject: Re: [PATCH v3] bugreport.c: fix a crash in `git bugreport` with `--no-suffix` option
Date: Fri, 15 Mar 2024 21:56:34 -0400	[thread overview]
Message-ID: <ZfT8UiDM3DQhRX5x@nand.local> (raw)
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 <barroit@linux.com>
> ---

    Acked-by: Taylor Blau <me@ttaylorr.com>

Thanks,
Taylor

      reply	other threads:[~2024-03-16  1:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-12 16:26 [PATCH] bugreport.c: fix a crash in `git bugreport` with `--no-suffix` option barroit via GitGitGadget
2024-03-13 15:59 ` Junio C Hamano
2024-03-13 17:42   ` Junio C Hamano
2024-03-16  1:55   ` Taylor Blau
2024-03-14  4:00 ` [PATCH v2 0/2] bugreport.c: fix a crash in git bugreport with --no-suffix option barroit via GitGitGadget
2024-03-14  4:00   ` [PATCH v2 1/2] bugreport.c: fix a crash in `git bugreport` with `--no-suffix` option Jiamu Sun via GitGitGadget
2024-03-14  4:00   ` [PATCH v2 2/2] doc: update doc file and usage for git-bugreport Jiamu Sun via GitGitGadget
2024-03-14 16:27   ` [PATCH v2 0/2] bugreport.c: fix a crash in git bugreport with --no-suffix option Junio C Hamano
2024-03-14 16:33     ` Junio C Hamano
2024-03-15 22:42       ` [PATCH v3] " Jiamu Sun
2024-03-14 22:34   ` [PATCH v3] bugreport.c: fix a crash in `git bugreport` with `--no-suffix` option Jiamu Sun
2024-03-16  1:56     ` Taylor Blau [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZfT8UiDM3DQhRX5x@nand.local \
    --to=me@ttaylorr.com \
    --cc=baiorettohr@gmail.com \
    --cc=barroit@linux.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).