Browse Source

Merge branch 'jm/maint-1.6.5-grep-NUL-terminate' into maint

* jm/maint-1.6.5-grep-NUL-terminate:
  grep: NUL terminate input from a file
maint
Junio C Hamano 15 years ago
parent
commit
7d0dafe394
  1. 1
      builtin-grep.c

1
builtin-grep.c

@ -205,6 +205,7 @@ static int grep_file(struct grep_opt *opt, const char *filename) @@ -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);

Loading…
Cancel
Save