Alexandre Julliard : winedump: Don' t crash on an invalid nrestab NE header value.
Alexandre Julliard
julliard at winehq.org
Thu Jul 1 11:19:29 CDT 2010
Module: wine
Branch: master
Commit: 009c59afb86df0f1e944de6575f1cf7d07baaac8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=009c59afb86df0f1e944de6575f1cf7d07baaac8
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Jun 30 21:03:32 2010 +0200
winedump: Don't crash on an invalid nrestab NE header value.
---
tools/winedump/ne.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/winedump/ne.c b/tools/winedump/ne.c
index 992d885..ae0388b 100644
--- a/tools/winedump/ne.c
+++ b/tools/winedump/ne.c
@@ -151,12 +151,12 @@ static void dump_ne_names( const IMAGE_OS2_HEADER *ne )
}
if (ne->ne_cbnrestab)
{
+ unsigned int pos = ne->ne_nrestab;
printf( "\nNon-resident name table:\n" );
- pstr = PRD(ne->ne_nrestab, 0);
- while (*pstr)
+ while ((pstr = PRD(pos, 0)) && *pstr)
{
printf( " %4d: %*.*s\n", get_word(pstr + *pstr + 1), *pstr, *pstr, pstr + 1 );
- pstr += *pstr + 1 + sizeof(WORD);
+ pos += *pstr + 1 + sizeof(WORD);
}
}
}
More information about the wine-cvs
mailing list