diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2015-06-25 15:26:43 -0400 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2015-06-25 15:26:43 -0400 |
| commit | 87987fd1e0f00a85c5fa16a96ca52decede629ae (patch) | |
| tree | f6c7031ea2e936a5c73dd247d038d43a1b57780b /src/path.c | |
| parent | daacf96d101b9d2100a5028090b5af5249d8893d (diff) | |
| parent | 3cf91d98e28f2519e69c9ce77a6d6454adc713d7 (diff) | |
| download | libgit2-87987fd1e0f00a85c5fa16a96ca52decede629ae.tar.gz | |
Merge pull request #3246 from libgit2/cmn/dont-grow-borrowed
Don't allow growing borrowed buffers
Diffstat (limited to 'src/path.c')
| -rw-r--r-- | src/path.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/path.c b/src/path.c index c2c90e48d..2558058dd 100644 --- a/src/path.c +++ b/src/path.c @@ -640,7 +640,7 @@ static bool _check_dir_contents( /* leave base valid even if we could not make space for subdir */ if (GIT_ADD_SIZET_OVERFLOW(&alloc_size, dir_size, sub_size) || GIT_ADD_SIZET_OVERFLOW(&alloc_size, alloc_size, 2) || - git_buf_try_grow(dir, alloc_size, false, false) < 0) + git_buf_try_grow(dir, alloc_size, false) < 0) return false; /* save excursion */ @@ -847,7 +847,7 @@ int git_path_make_relative(git_buf *path, const char *parent) /* save the offset as we might realllocate the pointer */ offset = p - path->ptr; - if (git_buf_try_grow(path, alloclen, 1, 0) < 0) + if (git_buf_try_grow(path, alloclen, 1) < 0) return -1; p = path->ptr + offset; |
