Commit 42c05ed5 by Patrick Steinhardt

path: use GITERR_CHECK_ALLOC_BUF to verify passed in buffer

parent 859ed5dd
...@@ -705,8 +705,7 @@ int git_path_resolve_relative(git_buf *path, size_t ceiling) ...@@ -705,8 +705,7 @@ int git_path_resolve_relative(git_buf *path, size_t ceiling)
char *base, *to, *from, *next; char *base, *to, *from, *next;
size_t len; size_t len;
if (!path || git_buf_oom(path)) GITERR_CHECK_ALLOC_BUF(path);
return -1;
if (ceiling > path->size) if (ceiling > path->size)
ceiling = path->size; ceiling = path->size;
......
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