git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] rev-parse: fix potential bus error with --parseopt option spec handling

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 26, 2008, 11:26 UTC
Message-ID
<alpine.LSU.1.00.0802261126130.17164@racer.site>
In-Reply-To
<1203998859-86344-1-git-send-email-jaysoffian@gmail.com>
Hi,
On Mon, 25 Feb 2008, Jay Soffian wrote:
Show 10 quoted lines
> diff --git a/builtin-rev-parse.c b/builtin-rev-parse.c
> index b9af1a5..90dbb9d 100644
> --- a/builtin-rev-parse.c
> +++ b/builtin-rev-parse.c
> @@ -315,7 +315,7 @@ static int cmd_parseopt(int argc, const char **argv, const char *prefix)
>  		s = strchr(sb.buf, ' ');
>  		if (!s || *sb.buf == ' ') {
>  			o->type = OPTION_GROUP;
> -			o->help = xstrdup(skipspaces(s));
> +			o->help = xstrdup(skipspaces(sb.buf));

Looks obviously correct, but I would have expected a SIGSEGV, not a SIGBUS.

Ciao, Dscho

Previous: Jay SoffianNext: Jay Soffian
Message 2 of 3 in “rev-parse: fix potential bus error with --parseopt option spec handling”
  1. rev-parse: fix potential bus error with --parseopt option spec handlingJay Soffian, Feb 26, 2008
  2. Johannes SchindelinFeb 26, 2008
  3. Jay SoffianFeb 26, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.