From 8a631b1173b1abecc5a737b0e21751ddbabf9df2 Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Mon, 17 Aug 2009 07:19:05 +0000 Subject: ui-tag.c: do not segfault when id is missing from query-string The purpose of the tag page is to print info about a specific tag, but if no tag was specified on the query-string cgit used to segfault. With this patch, cgit will fallback to the value of the 'h' parameter instead (which is never NULL due to prepare_repo_cmd() in cgit.c). It will now also verify that the specified tagname is in fact a valid ref in the 'refs/tags/' namespace, i.e. specifying 'id=master' will trigger a 'Bad tag reference' error. Noticed-by: Eric Wong Signed-off-by: Lars Hjemli --- (limited to 'ui-summary.c') -- cgit v0.9.0.2