File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -54,18 +54,34 @@ function TPEExportParser.Parse: TParserResult;
5454
5555 // If can't read whole table, failure.
5656 if not PE.ReadEx(@ExpDir, Sizeof(ExpDir)) then
57+ begin
58+ PE.Msg.Write(' Export Parser: not enough space to read dir. header.' );
5759 exit(PR_ERROR);
60+ end ;
5861
5962 // If no addresses, ok.
6063 if ExpDir.AddressTableEntries = 0 then
64+ begin
65+ PE.Msg.Write(' Export Parser: directory present, but there are no functions.' );
6166 exit(PR_OK);
67+ end ;
6268
6369 if ExpDir.ExportFlags <> 0 then
70+ begin
71+ PE.Msg.Write(' Export Parser: reserved directory flags <> 0' );
6472 exit(PR_ERROR);
73+ end ;
6574
6675 // Read lib exported name.
67- if (ExpDir.NameRVA <> 0 ) and (PE.SeekRVA(ExpDir.NameRVA)) then
76+ if (ExpDir.NameRVA <> 0 ) then
77+ begin
78+ if not PE.SeekRVA(ExpDir.NameRVA) then
79+ begin
80+ PE.Msg.Write(' Export Parser: Wrong RVA of dll exported name = 0x%x' , [ExpDir.NameRVA]);
81+ exit(PR_ERROR);
82+ end ;
6883 PE.ExportedName := PE.ReadAnsiString;
84+ end ;
6985
7086 base := ExpDir.OrdinalBase;
7187
You can’t perform that action at this time.
0 commit comments