summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Bex <address@hidden>2017-06-30 15:39:45 +0200
committerTobias Frost <tobi@debian.org>2017-10-21 23:04:32 +0200
commit36b5895d82fa9e5e263357f5478652dfce72a55c (patch)
tree26b9635cde2db9c5307bff5d92f50e95b0d64760
parent89de48cc049b9572840087ee4e2ba18005090427 (diff)
[PATCH 2/2] Initialize symbol table after setting up randomization
Otherwise, the symbol table wouldn't be correctly randomized. Gbp-Pq: Name CVE-2017-11343.patch
-rw-r--r--runtime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime.c b/runtime.c
index 2caeaea..8aa1a4d 100644
--- a/runtime.c
+++ b/runtime.c
@@ -783,7 +783,6 @@ int CHICKEN_initialize(int heap, int stack, int symbols, void *toplevel)
C_initial_timer_interrupt_period = INITIAL_TIMER_INTERRUPT_PERIOD;
C_timer_interrupt_counter = INITIAL_TIMER_INTERRUPT_PERIOD;
memset(signal_mapping_table, 0, sizeof(int) * NSIG);
- initialize_symbol_table();
C_dlerror = "cannot load compiled code dynamically - this is a statically linked executable";
error_location = C_SCHEME_FALSE;
C_pre_gc_hook = NULL;
@@ -795,6 +794,7 @@ int CHICKEN_initialize(int heap, int stack, int symbols, void *toplevel)
callback_continuation_level = 0;
gc_ms = 0;
(void)C_randomize(C_fix(time(NULL)));
+ initialize_symbol_table();
if (profiling) {
#ifndef C_NONUNIX