We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a463703 commit 30ad41fCopy full SHA for 30ad41f
PE.COFF.pas
@@ -62,6 +62,8 @@ procedure TCOFF.LoadStrings(AStream: TStream);
62
cbStringData: uint32;
63
FileHdr: TImageFileHeader;
64
begin
65
+ Clear;
66
+
67
// 4.6. COFF String Table
68
69
FileHdr := TPEImage(FPE).FileHeader^;
@@ -91,8 +93,11 @@ procedure TCOFF.LoadStrings(AStream: TStream);
91
93
exit;
92
94
95
// Load string block.
- SetLength(FStrings, cbStringData);
- StreamRead(AStream, FStrings[0], cbStringData);
96
+ if cbStringData <> 0 then
97
+ begin
98
+ SetLength(FStrings, cbStringData);
99
+ StreamRead(AStream, FStrings[0], cbStringData);
100
+ end;
101
end;
102
103
end.
0 commit comments