mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-28 02:16:21 +00:00
text: Null-terminate a string if we've been gouging it
This commit is contained in:
parent
b7fb71e39c
commit
24cce2398f
@ -143,6 +143,7 @@ int git_buf_text_lf_to_crlf(git_buf *tgt, const git_buf *src)
|
||||
tgt->ptr[tgt->size++] = '\n';
|
||||
}
|
||||
|
||||
tgt->ptr[tgt->size] = '\0';
|
||||
return git_buf_put(tgt, scan, end - scan);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user