Fix segmentation fault in hc()
The ctx.qry.page variable might be unset at this point, e.g. when an invalid command is passed and cgit_print_pageheader() is called to show an error message. Signed-off-by: Lukas Fleischer <lfleischer@lfos.de>
这个提交包含在:
父节点
559ab5ecc4
当前提交
da1b89710f
@ -889,6 +889,9 @@ void cgit_add_hidden_formfields(int incl_head, int incl_search,
|
|||||||
|
|
||||||
static const char *hc(const char *page)
|
static const char *hc(const char *page)
|
||||||
{
|
{
|
||||||
|
if (!ctx.qry.page)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
return strcmp(ctx.qry.page, page) ? NULL : "active";
|
return strcmp(ctx.qry.page, page) ? NULL : "active";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
正在加载...
在新工单中引用
屏蔽一个用户