Robert Shearman : dbghelp: Don'
t access a negative section index in elf_map_section.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Jul 17 08:14:59 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: f57ddeb9dbfbe6cafe7b21b35283b933596a9c7c
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=f57ddeb9dbfbe6cafe7b21b35283b933596a9c7c
Author: Robert Shearman <rob at codeweavers.com>
Date: Mon Jul 17 12:11:15 2006 +0100
dbghelp: Don't access a negative section index in elf_map_section.
---
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 11ddfb8..a509848 100644
--- a/dlls/dbghelp/elf_module.c
+++ b/dlls/dbghelp/elf_module.c
@@ -143,7 +143,7 @@ static const char* elf_map_section(struc
unsigned pgsz = getpagesize();
unsigned ofst, size;
- if (sidx >= fmap->elfhdr.e_shnum ||
+ if (sidx < 0 || sidx >= fmap->elfhdr.e_shnum ||
fmap->sect[sidx].shdr.sh_type == SHT_NOBITS)
return NO_MAP;
/* align required information on page size (we assume pagesize is a power of 2) */
More information about the wine-cvs
mailing list