aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/generic/segfault.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-01-08 18:06:26 +0000
committerUlrich Drepper <drepper@redhat.com>2001-01-08 18:06:26 +0000
commit2090dd736453e0fc9b646ed7bc342b55bafd441d (patch)
treef178d3049a824e8d4974057119d543e5c522a169 /sysdeps/generic/segfault.c
parent52ee62236b92ccde18442a32d0d8eee56d60f8d9 (diff)
downloadglibc-2090dd736453e0fc9b646ed7bc342b55bafd441d.tar
glibc-2090dd736453e0fc9b646ed7bc342b55bafd441d.tar.gz
glibc-2090dd736453e0fc9b646ed7bc342b55bafd441d.tar.bz2
glibc-2090dd736453e0fc9b646ed7bc342b55bafd441d.zip
Update.
* sysdeps/generic/segfault.c (install_handler): Check output file name with access().
Diffstat (limited to 'sysdeps/generic/segfault.c')
-rw-r--r--sysdeps/generic/segfault.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/generic/segfault.c b/sysdeps/generic/segfault.c
index 24ed3f8308..816e914c0c 100644
--- a/sysdeps/generic/segfault.c
+++ b/sysdeps/generic/segfault.c
@@ -1,5 +1,5 @@
/* Catch segmentation faults and print backtrace.
- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -237,6 +237,6 @@ install_handler (void)
/* Preserve the output file name if there is any given. */
name = getenv ("SEGFAULT_OUTPUT_NAME");
- if (name != NULL && name[0] != '\0')
+ if (name != NULL && name[0] != '\0' && __access (name, R_OK | W_OK) == 0)
fname = __strdup (name);
}