diff --git a/gl/lib/randread.c b/gl/lib/randread.c index 8e6b1c5b8..ccad16bc3 100644 --- a/gl/lib/randread.c +++ b/gl/lib/randread.c @@ -132,7 +132,13 @@ static struct randread_source * simple_new (FILE *source, void const *handler_arg) { struct randread_source *s = xmalloc (sizeof *s); + #ifdef __e2k__ + if (sizeof(void*) == 16) + { + // In E2K protected mode uninitialized memory can't be used + memset(s, 0, sizeof *s); + } + #endif s->source = source; s->handler = randread_error; s->handler_arg = handler_arg;