[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Patch] Crash on forbidden subdirectories with globstar shell option
From: |
Andreas Schwab |
Subject: |
Re: [Patch] Crash on forbidden subdirectories with globstar shell option |
Date: |
Tue, 21 Apr 2009 14:45:22 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) |
werner@suse.de writes:
> --- lib/glob/glob.c
> +++ lib/glob/glob.c 2009-04-21 10:51:48.478986919 +0000
> @@ -96,7 +96,7 @@ int noglob_dot_filenames = 1;
> int glob_ignore_case = 0;
>
> /* Global variable to return to signify an error in globbing. */
> -char *glob_error_return;
> +char *glob_error_return = (char *)NULL;
Global variables are already implicitly initialized.
> @@ -356,7 +356,7 @@ finddirs (pat, sdir, flags, ep, np)
> *np = 0;
> if (ep)
> *ep = 0;
> - if (r)
> + if (r && r != (char **)&glob_error_return)
The cast is a no-op.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."