summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/ssp.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-01-04 00:46:31 +0000
committerMike Frysinger <vapier@gentoo.org>2006-01-04 00:46:31 +0000
commitcd662e64be1b10615e2fb44d5f3dc97eca905a31 (patch)
tree3ce4c8efdd7bd86c94c2cd55485be726921c950b /libc/sysdeps/linux/common/ssp.c
parent2aa7788e7f161b9c51f3f5ec685b280fe42e380d (diff)
tweak __progname handling some more since some [bad] apps actually try and use it
Diffstat (limited to 'libc/sysdeps/linux/common/ssp.c')
-rw-r--r--libc/sysdeps/linux/common/ssp.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/libc/sysdeps/linux/common/ssp.c b/libc/sysdeps/linux/common/ssp.c
index ee9938650..6893ac358 100644
--- a/libc/sysdeps/linux/common/ssp.c
+++ b/libc/sysdeps/linux/common/ssp.c
@@ -77,12 +77,11 @@ static __always_inline attribute_noreturn void terminate(void)
void attribute_noreturn __stack_smash_handler(char func[], int damaged __attribute__ ((unused)));
void attribute_noreturn __stack_smash_handler(char func[], int damaged)
{
- extern char *__progname;
static const char message[] = ": stack smashing attack in function ";
block_signals();
- ssp_write(STDERR_FILENO, __progname, message, func);
+ ssp_write(STDERR_FILENO, __uclibc_progname, message, func);
/* The loop is added only to keep gcc happy. */
while(1)
@@ -91,13 +90,12 @@ void attribute_noreturn __stack_smash_handler(char func[], int damaged)
void attribute_noreturn __stack_chk_fail(void)
{
- extern char *__progname;
static const char msg1[] = "stack smashing detected: ";
static const char msg3[] = " terminated";
block_signals();
- ssp_write(STDERR_FILENO, msg1, __progname, msg3);
+ ssp_write(STDERR_FILENO, msg1, __uclibc_progname, msg3);
/* The loop is added only to keep gcc happy. */
while(1)
@@ -107,13 +105,12 @@ void attribute_noreturn __stack_chk_fail(void)
#if 0
void attribute_noreturn __chk_fail(void)
{
- extern char *__progname;
static const char msg1[] = "buffer overflow detected: ";
static const char msg3[] = " terminated";
block_signals();
- ssp_write(STDERR_FILENO, msg1, __progname, msg3);
+ ssp_write(STDERR_FILENO, msg1, __uclibc_progname, msg3);
/* The loop is added only to keep gcc happy. */
while(1)