revparse.c
20.2 KB
-
revparse: detect out-of-memory cases when parsing curly brace contents · c146374c
When extracting curly braces (e.g. the "upstream" part in "HEAD@{upstream}"), we put the curly braces' contents into a `git_buf` structure, but don't check the return value of `git_buf_putc`. So when we run out-of-memory, we'll use a partially filled buffer without noticing. Let's fix this issue by checking `git_buf_putc`'s return value.
Patrick Steinhardt committed