aboutsummaryrefslogtreecommitdiff
path: root/builtin-grep.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-01-18 18:16:19 -0800
committerJunio C Hamano <gitster@pobox.com>2010-01-18 18:16:19 -0800
commite33fd3c326831e70f6ca078e0f1c26ec147cb5b3 (patch)
treeaf0d9467c65cc9cb2d71a93451057d239c14181c /builtin-grep.c
parent4a88fb7ffc32bdfdfab2605430514d92aba25b8a (diff)
parent6f9752d2e29ecbd5d9489e57bfcd28fb030cba97 (diff)
downloadgit-e33fd3c326831e70f6ca078e0f1c26ec147cb5b3.tar.gz
git-e33fd3c326831e70f6ca078e0f1c26ec147cb5b3.tar.xz
Merge branch 'maint'
* maint: Update draft release notes to 1.6.6.1 grep: NUL terminate input from a file fast-import: tag may point to any object type
Diffstat (limited to 'builtin-grep.c')
-rw-r--r--builtin-grep.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin-grep.c b/builtin-grep.c
index 529461fb8..cea973ba6 100644
--- a/builtin-grep.c
+++ b/builtin-grep.c
@@ -205,6 +205,7 @@ static int grep_file(struct grep_opt *opt, const char *filename)
return 0;
}
close(i);
+ data[sz] = 0;
if (opt->relative && opt->prefix_length)
filename = quote_path_relative(filename, -1, &buf, opt->prefix);
i = grep_buffer(opt, filename, data, sz);