Calling access(p, m) with p == NULL is not specified, so don't do that. On
GNU/Hurd systems doing so will result in a SIGSEGV.
Signed-off-by: Thomas Schwinge <tschwinge@gnu.org>
---
builtin-add.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin-add.c b/builtin-add.c
index 7345479..de5c108 100644
--- a/builtin-add.c
+++ b/builtin-add.c
@@ -60,7 +60,7 @@ static void fill_directory(struct dir_struct *dir, const char **pathspec,
path = git_path("info/exclude");
if (!access(path, R_OK))
add_excludes_from_file(dir, path);
- if (!access(excludes_file, R_OK))
+ if (excludes_file != NULL && !access(excludes_file, R_OK))
add_excludes_from_file(dir, excludes_file);
}
--
1.5.3.rc3.26.g6c58-dirty
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
| Bron Gondwana | BUG: mmapfile/writev spurious zero bytes (x86_64/not i386, bisected, reproducable) |
| Greg Kroah-Hartman | [PATCH 012/196] nozomi driver |
| J.C. Pizarro | Re: linux+glibc memory allocator, poor performance |
| Pavel Roskin | ndiswrapper and GPL-only symbols redux |
git: | |
| Andy Parkins | svn:externals using git submodules |
| Linus Torvalds | Re: fatal: Out of memory, malloc failed |
| Peter Karlsson | RCS keyword expansion |
| Dennis Schridde | Odd number of elements in anonymous hash |
| Jarek Poplawski | [PATCH 00/14]: Killing qdisc->ops->requeue(). |
| jamal | [PATCH 2/3][NET_BATCH] net core use batching |
| Patrick McHardy | pkt_sched: add DRR scheduler |
| Marcel Holtmann | Bluetooth fixes for 2.6.27 |
| Charlie Clark | openbsd fail2ban |
| Hari | DHCP question |
| Richard Stallman | Real men don't attack straw men |
| Nick Guenther | Re: When will OpenBSD support UTF8? |
