1
0
mirror of https://github.com/git/git synced 2024-07-05 00:58:49 +00:00

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 <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Nick Hengeveld 2006-06-06 22:22:35 -07:00 committed by Junio C Hamano
parent 5ad312bede
commit e8dff6ba8b

View File

@ -399,6 +399,7 @@ void prefetch(unsigned char *sha1)
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) {