mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-05 08:46:02 +02:00
2004-07-26 Alain Magloire
Fix for PR 68665 * utils/org/eclipse/cdt/utils/coff/PE.java
This commit is contained in:
parent
a32d8676d5
commit
403548698f
2 changed files with 12 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-07-26 Alain Magloire
|
||||
|
||||
Fix for PR 68665
|
||||
* utils/org/eclipse/cdt/utils/coff/PE.java
|
||||
|
||||
2004-07-26 Vladimir Hirsl
|
||||
|
||||
HP-UX SOM Binary parser patch
|
||||
|
|
|
@ -493,11 +493,13 @@ public class PE {
|
|||
}
|
||||
} catch (IOException e) {
|
||||
}
|
||||
byte[] bytes = new byte[data.length - idx];
|
||||
System.arraycopy(data, idx, bytes, 0, data.length - idx);
|
||||
Coff.FileHeader filehdr = new Coff.FileHeader(bytes, true);
|
||||
if (isValidMachine(filehdr.f_magic)) {
|
||||
return getAttributes(filehdr);
|
||||
if (idx < data.length) {
|
||||
byte[] bytes = new byte[data.length - idx];
|
||||
System.arraycopy(data, idx, bytes, 0, data.length - idx);
|
||||
Coff.FileHeader filehdr = new Coff.FileHeader(bytes, true);
|
||||
if (isValidMachine(filehdr.f_magic)) {
|
||||
return getAttributes(filehdr);
|
||||
}
|
||||
}
|
||||
throw new IOException(CCorePlugin.getResourceString("Util.exception.notPE")); //$NON-NLS-1$
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue