summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2015-09-14 14:05:01 -0400
committerEdward Thomson <ethomson@microsoft.com>2015-09-14 14:05:01 -0400
commit8452fecc8fc14a59d37c7f06c9355e560aa66ed0 (patch)
tree7ebcf65a4ec28568ad18f3d6ba3b8333836b8c62
parent4cc355c97bd3a8c490759c489cfdcc9ab37e7f39 (diff)
downloadlibgit2-8452fecc8fc14a59d37c7f06c9355e560aa66ed0.tar.gz
cl_git_path_url: assert sane static buffer size
-rw-r--r--tests/clar_libgit2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/clar_libgit2.c b/tests/clar_libgit2.c
index cc687baeb..61442f88b 100644
--- a/tests/clar_libgit2.c
+++ b/tests/clar_libgit2.c
@@ -299,6 +299,8 @@ const char* cl_git_path_url(const char *path)
in_buf++;
}
+ cl_assert(url_buf.size < 4096);
+
strncpy(url, git_buf_cstr(&url_buf), 4096);
git_buf_free(&url_buf);
git_buf_free(&path_buf);