All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 10/23] http-push: do not SEGV after fetching a bad pack idx file
@ 2009-06-05 16:04 Tay Ray Chuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tay Ray Chuan @ 2009-06-05 16:04 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Junio C Hamano, Johannes Schindelin, Mike Hommey

In a70c232 ("http-fetch: do not SEGV after fetching a bad pack idx
file"), changes were made to the setup_index method in http-fetch.c
(known in its present form as http-walker.c after 30ae764 ("Modularize
commit-walker")). Since http-push.c has similar similar code for
processing index files, these changes should apply to http-push.c's
implementation of setup_index as well.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
---
 http-push.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/http-push.c b/http-push.c
index c8cb6e4..a6ca2ac 100644
--- a/http-push.c
+++ b/http-push.c
@@ -1065,6 +1065,8 @@ static int setup_index(unsigned char *sha1)
 		return -1;

 	new_pack = parse_pack_index(sha1);
+	if (!new_pack)
+		return -1; /* parse_pack_index() already issued error message */
 	new_pack->next = repo->packs;
 	repo->packs = new_pack;
 	return 0;
--
1.6.3.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 10/23] http-push: do not SEGV after fetching a bad pack idx file
       [not found] <cover.1244277116.git.rctay89@gmail.com>
@ 2009-06-06  8:43 ` Tay Ray Chuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tay Ray Chuan @ 2009-06-06  8:43 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Junio C Hamano, Johannes Schindelin, Mike Hommey

In a70c232 ("http-fetch: do not SEGV after fetching a bad pack idx
file"), changes were made to the setup_index method in http-fetch.c
(known in its present form as http-walker.c after 30ae764 ("Modularize
commit-walker")). Since http-push.c has similar similar code for
processing index files, these changes should apply to http-push.c's
implementation of setup_index as well.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
---
 http-push.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/http-push.c b/http-push.c
index c8cb6e4..a6ca2ac 100644
--- a/http-push.c
+++ b/http-push.c
@@ -1065,6 +1065,8 @@ static int setup_index(unsigned char *sha1)
 		return -1;

 	new_pack = parse_pack_index(sha1);
+	if (!new_pack)
+		return -1; /* parse_pack_index() already issued error message */
 	new_pack->next = repo->packs;
 	repo->packs = new_pack;
 	return 0;
--
1.6.3.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-06  8:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-05 16:04 [PATCH 10/23] http-push: do not SEGV after fetching a bad pack idx file Tay Ray Chuan
     [not found] <cover.1244277116.git.rctay89@gmail.com>
2009-06-06  8:43 ` Tay Ray Chuan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.