diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-07-28 11:30:41 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-07-28 11:30:41 -0700 |
commit | ad524f834a9acaaaceeb846d00ea609f79333a3d (patch) | |
tree | 2b6a49037e48602c34dea27d19e0668ed8c35724 /builtin/apply.c | |
parent | t1402: check for refs ending with a dot (diff) | |
parent | apply: avoid possible bogus pointer (diff) | |
download | tgif-ad524f834a9acaaaceeb846d00ea609f79333a3d.tar.xz |
Merge branch 'jk/misc-fixes-maint'
* jk/misc-fixes-maint:
apply: avoid possible bogus pointer
fix memory leak parsing core.commentchar
transport: fix leaks in refs_from_alternate_cb
free ref string returned by dwim_ref
receive-pack: don't copy "dir" parameter
Diffstat (limited to 'builtin/apply.c')
-rw-r--r-- | builtin/apply.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/apply.c b/builtin/apply.c index 9f8f5bac07..be2b4ce2fd 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -1075,7 +1075,7 @@ static int gitdiff_index(const char *line, struct patch *patch) line = ptr + 2; ptr = strchr(line, ' '); - eol = strchr(line, '\n'); + eol = strchrnul(line, '\n'); if (!ptr || eol < ptr) ptr = eol; |