mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-22 08:33:46 +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);
|
||||
commentType = 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 ||
|
||||
commentClass == COMMENT_CLASS_DEFAULT_LIBRARY) {
|
||||
switch(commentClass) {
|
||||
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
|
||||
break;
|
||||
case COMMENT_CLASS_LIBMOD:
|
||||
value = readString(reader);
|
||||
break;
|
||||
}
|
||||
readCheckSumByte(reader);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user