mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 17:05:49 +00:00
buf test: make sure we always set the bom variable
This commit is contained in:
parent
f684970a10
commit
9ff07c24f5
@ -114,6 +114,7 @@ int git_buf_text_detect_bom(git_bom_t *bom, const git_buf *buf, size_t offset)
|
||||
const char *ptr;
|
||||
size_t len;
|
||||
|
||||
*bom = GIT_BOM_NONE;
|
||||
/* need at least 2 bytes after offset to look for any BOM */
|
||||
if (buf->size < offset + 2)
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user