* [PATCH] http-fetch: fix possible segfault
@ 2006-06-07 5:22 Nick Hengeveld
0 siblings, 0 replies; only message in thread
From: Nick Hengeveld @ 2006-06-07 5:22 UTC (permalink / raw)
To: git
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>
---
http-fetch.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/http-fetch.c b/http-fetch.c
index 661c909..d3602b7 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -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) {
--
1.4.0.rc1.gf75c7-dirty
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-06-07 5:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-07 5:22 [PATCH] http-fetch: fix possible segfault Nick Hengeveld
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).