Commit 490d0c9c by Patrick Steinhardt

diff_print: return out-of-memory situation when printing binary

We currently don't check for out-of-memory situations on exiting
`format_binary` and, as a result, may return a partially filled buffer.
Fix this by checking the buffer via `git_buf_oom`.
parent bea5fd9f
...@@ -491,6 +491,9 @@ static int format_binary( ...@@ -491,6 +491,9 @@ static int format_binary(
} }
git_buf_putc(pi->buf, '\n'); git_buf_putc(pi->buf, '\n');
if (git_buf_oom(pi->buf))
return -1;
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment