From 42c05ed56b3bc4f5963a8c68ec6fec803b7e22e3 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Tue, 23 Feb 2016 10:02:44 +0100 Subject: [PATCH] path: use GITERR_CHECK_ALLOC_BUF to verify passed in buffer --- src/path.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/path.c b/src/path.c index 852ef576a..1fd14fcb9 100644 --- a/src/path.c +++ b/src/path.c @@ -705,8 +705,7 @@ int git_path_resolve_relative(git_buf *path, size_t ceiling) char *base, *to, *from, *next; size_t len; - if (!path || git_buf_oom(path)) - return -1; + GITERR_CHECK_ALLOC_BUF(path); if (ceiling > path->size) ceiling = path->size;