fix loadmap: prevent stack/heap overlap based exploits