shithub: riscv

Download patch

ref: 919f1ae4f46a9626e281a588bc0c16bf93c804d0
parent: 50a98145e6c07f4e3ec588eb040334f531b5fe7c
author: cinap_lenrek <[email protected]>
date: Sun Jul 30 13:27:41 EDT 2023

git: fix zero hash check crash in git/serve

--- a/sys/src/cmd/git/ref.c
+++ b/sys/src/cmd/git/ref.c
@@ -142,7 +142,7 @@
 		unref(o);
 	}		
 	for(i = 0; i < ntail; i++){
-		if(hasheq(&head[i], &Zhash))
+		if(hasheq(&tail[i], &Zhash))
 			continue;
 		if((o = readobject(tail[i])) == nil){
 			werrstr("read tail %H: %r", tail[i]);