Jim Meyering wrote: > Standish Parsley wrote: >> In grep 2.6, savedir.c is broken. The following will produce a segfault >> with grep 2.6, but works fine with grep 2.5.4: >> >> grep -rl --exclude-dir=foo NEEDLE $HOME >> >> It looks like, in savedir.c's isdir1(), path is being accessed before it is >> allocated. > > Thanks for the report! > That is definitely a bug. > This makes me regret not removing savedir a couple > months ago when I converted to gnulib... > > Here's the fix. > I'll push shortly, once I've added a test to exercise the > code in question. > > Subject: [PATCH] grep: don't segfault upon use of --exclude or --exclude-dir
To be precise, any use of --include or --exclude-from would also cause a segfault.
