Page MenuHomeFreeBSD

D15173.id41773.diff
No OneTemporary

D15173.id41773.diff

Index: lib/libc/secure/stack_protector.c
===================================================================
--- lib/libc/secure/stack_protector.c
+++ lib/libc/secure/stack_protector.c
@@ -56,13 +56,19 @@
static const int mib[2] = { CTL_KERN, KERN_ARND };
size_t len;
int error;
+ long tmp_stack_chk_guard[sizeof(__stack_chk_guard) / sizeof(__stack_chk_guard[0])];
if (__stack_chk_guard[0] != 0)
return;
- error = _elf_aux_info(AT_CANARY, __stack_chk_guard,
- sizeof(__stack_chk_guard));
- if (error == 0 && __stack_chk_guard[0] != 0)
+ error = _elf_aux_info(AT_CANARY, tmp_stack_chk_guard,
+ sizeof(tmp_stack_chk_guard));
+ if (error == 0 && tmp_stack_chk_guard[0] != 0) {
+ int idx;
+ for (idx = 0; idx < sizeof(__stack_chk_guard) / sizeof(__stack_chk_guard[0]); idx++) {
+ __stack_chk_guard[idx] = tmp_stack_chk_guard[idx];
+ }
return;
+ }
len = sizeof(__stack_chk_guard);
if (__sysctl(mib, nitems(mib), __stack_chk_guard, &len, NULL, 0) ==

File Metadata

Mime Type
text/plain
Expires
Wed, Jul 22, 3:12 PM (7 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35368872
Default Alt Text
D15173.id41773.diff (979 B)

Event Timeline