From b75e3deb6a8d0860167e66a8f1e128dfec452c69 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Wed, 15 Jul 2026 14:05:37 -1000 Subject: Harden the blob view error paths A blob requested by ref with an unknown path fell through to the commit object and was served with a 200 instead of a 404, two error pages passed a null pointer to a %s format when the request carried no object id, and the error pages left the layout open. --- source/ui-blame.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/ui-blame.c') diff --git a/source/ui-blame.c b/source/ui-blame.c index 5c6f36e..1b9df88 100644 --- a/source/ui-blame.c +++ b/source/ui-blame.c @@ -229,9 +229,10 @@ static void print_object(const struct object_id *oid, const char *path, html("\n\n"); - cgit_print_layout_end(); - cleanup: + /* The binary and oversized branches jump here with the layout still + * open, so close it on every path rather than only the normal one. */ + cgit_print_layout_end(); free(buf); } -- cgit v2.8.0