summaryrefslogtreecommitdiff
path: root/builtin-grep.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2010-01-18 18:16:19 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-01-18 18:16:19 -0800
commite33fd3c326831e70f6ca078e0f1c26ec147cb5b3 (patch)
treeaf0d9467c65cc9cb2d71a93451057d239c14181c /builtin-grep.c
parentMerge branch 'jc/rerere' (diff)
parentUpdate draft release notes to 1.6.6.1 (diff)
downloadtgif-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 529461fb8f..cea973ba6b 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);