Merge branch 'jm/maint-1.6.5-grep-NUL-terminate' into maint-1.6.5
* jm/maint-1.6.5-grep-NUL-terminate: grep: NUL terminate input from a file
This commit is contained in:
commit
27132ca85a
@ -207,6 +207,7 @@ static int grep_file(struct grep_opt *opt, const char *filename)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
close(i);
|
close(i);
|
||||||
|
data[sz] = 0;
|
||||||
if (opt->relative && opt->prefix_length)
|
if (opt->relative && opt->prefix_length)
|
||||||
filename = quote_path_relative(filename, -1, &buf, opt->prefix);
|
filename = quote_path_relative(filename, -1, &buf, opt->prefix);
|
||||||
i = grep_buffer(opt, filename, data, sz);
|
i = grep_buffer(opt, filename, data, sz);
|
||||||
|
Loading…
Reference in New Issue
Block a user