From 97ec09e1cc941fe04e6faf3380b3ccf9d67054c4 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Wed, 15 Jul 2026 19:57:16 -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 2.12.1