mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 17:26:01 +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
|
2004-07-26 Vladimir Hirsl
|
||||||
|
|
||||||
HP-UX SOM Binary parser patch
|
HP-UX SOM Binary parser patch
|
||||||
|
|
|
@ -493,11 +493,13 @@ public class PE {
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
}
|
}
|
||||||
byte[] bytes = new byte[data.length - idx];
|
if (idx < data.length) {
|
||||||
System.arraycopy(data, idx, bytes, 0, data.length - idx);
|
byte[] bytes = new byte[data.length - idx];
|
||||||
Coff.FileHeader filehdr = new Coff.FileHeader(bytes, true);
|
System.arraycopy(data, idx, bytes, 0, data.length - idx);
|
||||||
if (isValidMachine(filehdr.f_magic)) {
|
Coff.FileHeader filehdr = new Coff.FileHeader(bytes, true);
|
||||||
return getAttributes(filehdr);
|
if (isValidMachine(filehdr.f_magic)) {
|
||||||
|
return getAttributes(filehdr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw new IOException(CCorePlugin.getResourceString("Util.exception.notPE")); //$NON-NLS-1$
|
throw new IOException(CCorePlugin.getResourceString("Util.exception.notPE")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue