{"thread":{"id":"16390","subject":"[PATCH] Fix handle leak in sha1_file/unpack_objects if there were damaged object data","startedAt":"2008-11-19T11:14:05Z","lastAt":"2008-11-19T12:49:57Z","messageCount":2,"participants":["Alex Riesen","Nicolas Pitre"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"96135","messageId":"81b0412b0811190314k92a0acbn3ea820cce2a7a40b@mail.gmail.com","threadId":"16390","inReplyTo":null,"subject":"[PATCH] Fix handle leak in sha1_file/unpack_objects if there were damaged object data","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2008-11-19T11:14:05Z","receivedAt":"2008-11-19T11:14:05Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"In the case of bad packed object CRC, unuse_pack wasn't called after\ncheck_pack_crc which calls use_pack.\n\nSigned-off-by: Alex Riesen <raa.lkml@gmail.com>\n---\n sha1_file.c |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\n\nFrom 3b4c13ddeebe4bc54a3f9ab9bd26909cc5e1eff3 Mon Sep 17 00:00:00 2001\nFrom: Alex Riesen <raa.lkml@gmail.com>\nDate: Wed, 19 Nov 2008 11:17:13 +0100\nSubject: [PATCH] Fix handle leak in sha1_file/unpack_objects if there were damaged object data\n\nIn the case of bad packed object CRC, unuse_pack wasn't called after\ncheck_pack_crc which calls use_pack.\n\nSigned-off-by: Alex Riesen <raa.lkml@gmail.com>\n---\n sha1_file.c |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/sha1_file.c b/sha1_file.c\nindex 75a748a..0106e2c 100644\n--- a/sha1_file.c\n+++ b/sha1_file.c\n@@ -1749,6 +1749,7 @@ void *unpack_entry(struct packed_git *p, off_t obj_offset,\n \t\t\terror(\"bad packed object CRC for %s\",\n \t\t\t      sha1_to_hex(sha1));\n \t\t\tmark_bad_packed_object(p, sha1);\n+\t\t\tunuse_pack(&w_curs);\n \t\t\treturn NULL;\n \t\t}\n \t}\n-- \n1.6.0.4.644.gb619a\n\n"},{"id":"96146","messageId":"alpine.LFD.2.00.0811190749250.27509@xanadu.home","threadId":"16390","inReplyTo":"81b0412b0811190314k92a0acbn3ea820cce2a7a40b@mail.gmail.com","subject":"Re: [PATCH] Fix handle leak in sha1_file/unpack_objects if there were damaged object data","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2008-11-19T12:49:57Z","receivedAt":"2008-11-19T12:49:57Z","isPatch":true,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Wed, 19 Nov 2008, Alex Riesen wrote:\n\n> In the case of bad packed object CRC, unuse_pack wasn't called after\n> check_pack_crc which calls use_pack.\n> \n> Signed-off-by: Alex Riesen <raa.lkml@gmail.com>\n\nAcked-by: Nicolas Pitre <nico@cam.org>\n\n\n> ---\n>  sha1_file.c |    1 +\n>  1 files changed, 1 insertions(+), 0 deletions(-)\n> \n\n\nNicolas\n"}]}