{"thread":{"id":"4418","subject":"[PATCH] http-fetch: fix possible segfault","startedAt":"2006-06-07T05:22:35Z","lastAt":"2006-06-07T05:22:35Z","messageCount":1,"participants":["Nick Hengeveld"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"21370","messageId":"20060607052235.GA4000@reactrix.com","threadId":"4418","inReplyTo":null,"subject":"[PATCH] http-fetch: fix possible segfault","fromName":"Nick Hengeveld","fromEmail":"nickh@reactrix.com","sentAt":"2006-06-07T05:22:35Z","receivedAt":"2006-06-07T05:22:35Z","isPatch":true,"sender":{"key":"nickh@reactrix.com","avatar":null},"body":"Initialize an object request's slot to a safe value.  A non-NULL value\ncan cause a segfault if the request is aborted before it starts.\n\nSigned-off-by: Nick Hengeveld <nickh@reactrix.com>\n---\n http-fetch.c |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/http-fetch.c b/http-fetch.c\nindex 661c909..d3602b7 100644\n--- a/http-fetch.c\n+++ b/http-fetch.c\n@@ -399,6 +399,7 @@ void prefetch(unsigned char *sha1)\n \tsnprintf(newreq->filename, sizeof(newreq->filename), \"%s\", filename);\n \tsnprintf(newreq->tmpfile, sizeof(newreq->tmpfile),\n \t\t \"%s.temp\", filename);\n+\tnewreq->slot = NULL;\n \tnewreq->next = NULL;\n \n \tif (object_queue_head == NULL) {\n-- \n1.4.0.rc1.gf75c7-dirty\n"}]}