dbghelp: Do not write to array element -1.
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 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;