Diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Trim a snapshot name without reading out of bounds
For a url of .git, or an empty one, repo_basename stepped its index to the byte before its buffer, read it, and would have cleared it had it held a slash. Git's strbuf trims take the same steps safely, and they lift the 1024-byte cap that failed the page for a longer url.
Diffstat (limited to 'source/ui-shared.h')
-rw-r--r--source/ui-shared.h3
1 file changed, 2 insertions, 1 deletion