1. Stefan Saasen
  2. git

Commits

Junio C Hamano  committed c43a1be Merge

Merge branch 'jc/maint-smart-http-race-upload-pack' into maint

* jc/maint-smart-http-race-upload-pack:
get_indexed_object can return NULL if nothing is in that slot; check for it

  • Participants
  • Parent commits b0b35a6, 2a74532
  • Branches master

Comments (0)

Files changed (1)

File upload-pack.c

View file
  • Ignore whitespace
 	namebuf[41] = '\n';
 	for (i = get_max_object_index(); 0 < i; ) {
 		o = get_indexed_object(--i);
+		if (!o)
+			continue;
 		if (!(o->flags & OUR_REF))
 			continue;
 		memcpy(namebuf + 1, sha1_to_hex(o->sha1), 40);