shithub: riscv

Download patch

ref: 3ee79baf89443f47c6194fbae65d215365e885a0
parent: d67e83ed27fbb11ad21880352e706e095ecc0dfb
author: Ori Bernstein <ori@eigenstate.org>
date: Fri Dec 2 18:20:00 EST 2022

git: prevent infinite recursion with cyclic symlinks (thanks cosa)

--- a/sys/src/cmd/git/fs.c
+++ b/sys/src/cmd/git/fs.c
@@ -453,6 +453,9 @@
 			break;
 	}
 	free(path);
+	for(i = 0; o != nil && i < aux->ncrumb; i++)
+		if(crumb(aux, i)->obj == o)
+			return nil;
 	return o;
 }