diff options
Diffstat (limited to 'builtin')
-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 87439fad11..5b7a3066ad 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -1073,7 +1073,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; |