mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-09 07:20:07 +00:00
pkt: use sizeof() instead of strlen() to avoid variable length array
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
This commit is contained in:
parent
932669b865
commit
85b9165201
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user