Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use returned buffer size of git_buf #1047

Merged
merged 1 commit into from
Nov 10, 2020
Merged

Use returned buffer size of git_buf #1047

merged 1 commit into from
Nov 10, 2020

Conversation

jbenc
Copy link

@jbenc jbenc commented Nov 10, 2020

The returned string may contain a '\0' character. Although not common, it
can happen e.g. in the diff output. Instead of truncating the output on the
null character, use the returned size from git_buf.

Fixes #1043

The returned string may contain a '\0' character. Although not common, it
can happen e.g. in the diff output. Instead of truncating the output on the
null character, use the returned size from git_buf.

Fixes #1043
@jdavid jdavid merged commit 2fc423c into libgit2:master Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pygit2 truncates diff from Linux kernel commit bb8d8a6f54c1
2 participants