pkt: use sizeof() instead of strlen() to avoid variable length array Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
diff --git a/src/pkt.c b/src/pkt.c
index f802bbd..4eac041 100644
--- a/src/pkt.c
+++ b/src/pkt.c
@@ -302,7 +302,7 @@ int git_pkt_send_wants(git_headarray *refs, git_transport_caps *caps, int fd)
{
unsigned int i = 0;
int error = GIT_SUCCESS;
- char buf[strlen(WANT_PREFIX) + GIT_OID_HEXSZ + 2];
+ char buf[sizeof(WANT_PREFIX) + GIT_OID_HEXSZ + 1];
git_remote_head *head;
memcpy(buf, WANT_PREFIX, strlen(WANT_PREFIX));