Skip to content

Commit fd50810

Browse files
committed
url: ensure minimum components for formatting
1 parent 002b2ff commit fd50810

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/net.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,9 @@ void git_net_url_swap(git_net_url *a, git_net_url *b)
401401

402402
int git_net_url_fmt(git_buf *buf, git_net_url *url)
403403
{
404+
GIT_ASSERT_ARG(in->scheme);
405+
GIT_ASSERT_ARG(in->host);
406+
404407
git_buf_puts(buf, url->scheme);
405408
git_buf_puts(buf, "://");
406409

0 commit comments

Comments
 (0)