From 6d9b0afbb35da4c87bd9fceca27287e90385de51 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sun, 24 Feb 2008 10:16:59 +0000 Subject: Use rounded down address when changing memory protections on the GOT, such that we don't accidentally touch the page after the GOT. ok drahn@ --- libexec/ld.so/sparc64/rtld_machine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/ld.so/sparc64/rtld_machine.c b/libexec/ld.so/sparc64/rtld_machine.c index ff5bd712575..5693f9ce807 100644 --- a/libexec/ld.so/sparc64/rtld_machine.c +++ b/libexec/ld.so/sparc64/rtld_machine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld_machine.c,v 1.40 2007/11/27 16:42:19 miod Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.41 2008/02/24 10:16:58 kettenis Exp $ */ /* * Copyright (c) 1999 Dale Rahn @@ -749,7 +749,7 @@ _dl_md_reloc_got(elf_object_t *object, int lazy) pltgot[8] = (Elf_Addr)object; } if (object->got_size != 0) - _dl_mprotect((void*)object->got_addr, object->got_size, + _dl_mprotect((void*)object->got_start, object->got_size, PROT_READ); if (object->plt_size != 0) _dl_mprotect((void*)object->plt_start, object->plt_size, -- cgit v1.2.3