mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-27 21:15:32 +08:00
OMF Format: Fix COMMENT_CLASS_LIBMOD handling
This commit is contained in:
+9
-4
@@ -36,12 +36,17 @@ public class OmfCommentRecord extends OmfRecord {
|
|||||||
readRecordHeader(reader);
|
readRecordHeader(reader);
|
||||||
commentType = reader.readNextByte();
|
commentType = reader.readNextByte();
|
||||||
commentClass = reader.readNextByte();
|
commentClass = reader.readNextByte();
|
||||||
byte[] bytes = reader.readNextByteArray(
|
|
||||||
getRecordLength() - 3 /* 3 = sizeof(commentType+commentClass+trailing_crcbyte*/);
|
|
||||||
|
|
||||||
if (commentClass == COMMENT_CLASS_TRANSLATOR || commentClass == COMMENT_CLASS_LIBMOD ||
|
switch(commentClass) {
|
||||||
commentClass == COMMENT_CLASS_DEFAULT_LIBRARY) {
|
case COMMENT_CLASS_TRANSLATOR:
|
||||||
|
case COMMENT_CLASS_DEFAULT_LIBRARY:
|
||||||
|
byte[] bytes = reader.readNextByteArray(
|
||||||
|
getRecordLength() - 3 /* 3 = sizeof(commentType+commentClass+trailing_crcbyte*/);
|
||||||
value = new String(bytes, StandardCharsets.US_ASCII); // assuming ASCII
|
value = new String(bytes, StandardCharsets.US_ASCII); // assuming ASCII
|
||||||
|
break;
|
||||||
|
case COMMENT_CLASS_LIBMOD:
|
||||||
|
value = readString(reader);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
readCheckSumByte(reader);
|
readCheckSumByte(reader);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user