Skip to content

Commit 05541e0

Browse files
Fix bad rule parsing (#188)
1 parent 8b5b08c commit 05541e0

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

MAPIInspector/Source/Parsers/MSOXORULE.cs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -840,18 +840,11 @@ public override void Parse(Stream s)
840840
base.Parse(s);
841841
this.FolderInThisStore = this.ReadBoolean();
842842
this.StoreEIDSize = this.ReadUshort();
843-
if (this.FolderInThisStore)
844-
{
845-
MAPIString storeEID = new MAPIString(Encoding.ASCII, string.Empty, this.StoreEIDSize);
846-
storeEID.Parse(s);
847-
this.StoreEID = storeEID;
848-
}
849-
else
850-
{
851-
StoreObjectEntryID storeEID = new StoreObjectEntryID();
852-
storeEID.Parse(s);
853-
this.StoreEID = storeEID;
854-
}
843+
844+
// 2.2.5.1.2.1 OP_MOVE and OP_COPY ActionData Structure
845+
// No matter the value of FolderInThisStore, the server tends to set StoreEIDSize to 0x0001.
846+
// So instead of parsing it, we'll just read StoreEIDSize bytes.
847+
this.StoreEID = this.ReadBytes(this.StoreEIDSize);
855848

856849
this.FolderEIDSize = this.ReadUshort();
857850
if (this.FolderInThisStore)

0 commit comments

Comments
 (0)