# Segfault when fetching from current git.git on GitHub

2 messages from 2013-12-03 to 2013-12-03. Participants: Ralf Thielow, Jonathan Nieder.
Thread: https://gitlist.dev/t/35466

## Ralf Thielow, 2013-12-03 18:56

Subject: Segfault when fetching from current git.git on GitHub
Message-ID: <CAN0XMOKPWm1CzS3289SHpH=N0osFszuvnK6e9BVxwtQe3b2YJg@mail.gmail.com>
URL: https://gitlist.dev/e/CAN0XMOKPWm1CzS3289SHpH%3DN0osFszuvnK6e9BVxwtQe3b2YJg%40mail.gmail.com

```
Hi,

I've fetched from the current git.git on GitHub minutes ago and got a
segfault. I could reproduce it with the Git version of the current "next" branch
(1.8.5.392.gf545f4d) with the steps below. The segfault does not appear with
version 1.8.5.

Steps to reproduce:
git init tmp
cd tmp
git remote add origin https://github.com/git/git.git
git fetch -v

Full stacktrace: http://pastebin.com/zK8epKWj
ProcMaps and ProcStatus from Ubuntu's Apport: http://pastebin.com/ZpPk1WSA


Ralf

```

## Jonathan Nieder, 2013-12-03 19:20

Subject: Re: Segfault when fetching from current git.git on GitHub
Message-ID: <20131203192018.GD29959@google.com>
URL: https://gitlist.dev/e/20131203192018.GD29959%40google.com
In-Reply-To: <CAN0XMOKPWm1CzS3289SHpH=N0osFszuvnK6e9BVxwtQe3b2YJg@mail.gmail.com>

```
Hi,

Ralf Thielow wrote:

> I've fetched from the current git.git on GitHub minutes ago and got a
> segfault. I could reproduce it with the Git version of the current "next" branch
> (1.8.5.392.gf545f4d) with the steps below. The segfault does not appear with
> version 1.8.5.

Yep, I can reproduce this.

  (gdb) bt
  #0  next_quote_pos (s=0x0, maxlen=-1) at quote.c:168
  #1  0x00000000004ca2bb in quote_c_style_counted (name=0x0, maxlen=-1, sb=0x7fffffffe290, fp=0x0, no_dq=0) at quote.c:215
  #2  0x00000000004fd4c0 in set_helper_option (transport=<optimized out>, name=0x525f89 "depth", value=0x0) at transport-helper.c:307
  #3  0x00000000004fb57f in transport_set_option (transport=0x7d5740, name=<optimized out>, value=0x0) at transport.c:1004
  #4  0x000000000042de10 in backfill_tags (ref_map=0x806a50, transport=0x7d5740) at builtin/fetch.c:791

It's fallout from 0f284b11 (transport: catch non positive --depth
option value, 2013-11-26).

```
