Module: wine Branch: master Commit: a39f3da5fcc9737d5af584749d78587df099a61c URL: http://source.winehq.org/git/wine.git/?a=commit;h=a39f3da5fcc9737d5af584749d...
Author: Peter Oberndorfer kumbayo84@arcor.de Date: Wed Nov 8 21:24:52 2006 +0100
dbghelp: Do not write to array element -1.
---
dlls/dbghelp/elf_module.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c index 8aaeb5f..86b5c7a 100644 --- a/dlls/dbghelp/elf_module.c +++ b/dlls/dbghelp/elf_module.c @@ -162,7 +162,7 @@ static const char* elf_map_section(struc */ static void elf_unmap_section(struct elf_file_map* fmap, int sidx) { - if (sidx < fmap->elfhdr.e_shnum && fmap->sect[sidx].mapped != NO_MAP) + if (sidx >= 0 && sidx < fmap->elfhdr.e_shnum && fmap->sect[sidx].mapped != NO_MAP) { munmap((char*)fmap->sect[sidx].mapped, fmap->sect[sidx].shdr.sh_size); fmap->sect[sidx].mapped = NO_MAP;