Anonymous committed e8dff6b

http-fetch: fix possible segfault

Initialize an object request's slot to a safe value. A non-NULL value
can cause a segfault if the request is aborted before it starts.

Signed-off-by: Nick Hengeveld <>
Signed-off-by: Junio C Hamano <>

  • Participants
  • Parent commits 5ad312b

Comments (0)

Files changed (1)

File http-fetch.c

 	snprintf(newreq->filename, sizeof(newreq->filename), "%s", filename);
 	snprintf(newreq->tmpfile, sizeof(newreq->tmpfile),
 		 "%s.temp", filename);
+	newreq->slot = NULL;
 	newreq->next = NULL;
 	if (object_queue_head == NULL) {