From cd662e64be1b10615e2fb44d5f3dc97eca905a31 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 4 Jan 2006 00:46:31 +0000 Subject: tweak __progname handling some more since some [bad] apps actually try and use it --- libc/sysdeps/linux/common/ssp.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'libc/sysdeps/linux/common/ssp.c') 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) -- cgit v1.2.3