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

Re: segfault in http.c when https URL is mistyped

From
Jeff King <peff@peff.net>
Date
Sep 7, 2016, 20:11 UTC
Message-ID
<20160907201107.sgb7upqpzyap45bd@sigill.intra.peff.net>
In-Reply-To
<20160907200642.5o3otxxt7ybw6x4c@sigill.intra.peff.net>
On Wed, Sep 07, 2016 at 04:06:42PM -0400, Jeff King wrote:
Show 7 quoted lines
> +test_expect_success 'remote-http complains cleanly about malformed urls' '
> +	# do not actually issue "list" or other commands, as we do not
> +	# want to rely on what curl would actually do with such a broken
> +	# URL. This is just about making sure we do not segfault during
> +	# initialization.
> +	test_must_fail git remote-http http::/example.com/repo.git
> +'

Actually, I guess remote-http actually sees just "/example.com/repo.git" for the case we're discussing. It segfaults with either input without this patch, and works with it, though.

(I didn't test "git clone" directly because it hides the segfault made by the remote helper, so we cannot tell the difference between a segfault and "this URL is broken").

-Peff
Previous: Jeff King
Message 3 of 3 in “segfault in http.c when https URL is mistyped”
  1. Lars WendlerSep 7, 2016
  2. Jeff KingSep 7, 2016
  3. Jeff KingSep 7, 2016

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.