about summary refs log tree commit diff
path: root/ui-blob.c
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2009-08-17 09:19:05 +0200
committerLars Hjemli <hjemli@gmail.com>2009-08-17 09:24:36 +0200
commit8a631b1173b1abecc5a737b0e21751ddbabf9df2 (patch)
tree93320a0e21c1f13e936ccac66d250b28fa87acc1 /ui-blob.c
parentCGIT 0.8.2.1 (diff)
downloadcgit-pink-8a631b1173b1abecc5a737b0e21751ddbabf9df2.tar.gz
cgit-pink-8a631b1173b1abecc5a737b0e21751ddbabf9df2.zip
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 <normalperson@yhbt.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'ui-blob.c')
0 files changed, 0 insertions, 0 deletions
rl/commit/handle.c?h=2.2a&id=36d37bbf677768f2c55e46f50127bb228c6cdd62&follow=1'>Handle PART and QUIT without messagesJune McEnroe 2018-08-07Make safe filling the who bufferJune McEnroe 2018-08-07Add reverse and reset IRC formatting codesJune McEnroe 2018-08-06Rewrite line editing again, add formattingJune McEnroe 2018-08-06Fix allocation size in vaswprintfJune McEnroe This is so embarrassing. It only started crashing once it had strings that were long enough, and then it took me so long to notice this mistake. I was worried I was still doing va_list wrong somehow. 2018-08-06Implement word wrappingJune McEnroe 2018-08-06Use wchar_t strings for all of UIJune McEnroe vaswprintf is a nightmare. 2018-08-06Rename line editing functionsJune McEnroe 2018-08-05Initialize all possible color pairsJune McEnroe This is actually possible with use_default_colors! 2018-08-05Refactor color initializationJune McEnroe 2018-08-05Add ^L redrawJune McEnroe 2018-08-05Use 16 colors if availableJune McEnroe Fall back to using bold if there are only 8 colors. This also allowed bright background colors in 16-color terminals. I must port this system to torus. I'll be able to remove the awful termcap patch hack. 2018-08-05Limit parsed colors to number of mIRC colorsJune McEnroe Oh boy that's embarrassing. 2018-08-04Show source link on exitJune McEnroe 2018-08-04Implement line editing, scrollingJune McEnroe Don't really have a way to implement the M-* keys, and currently missing C-w. 2018-08-04Handle /topicJune McEnroe