text: Null-terminate a string if we've been gouging it

This commit is contained in:
Vicent Marti 2014-11-21 18:09:57 +01:00
parent b7fb71e39c
commit 24cce2398f

View File

@ -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);
}