Skip to content

Commit

Permalink
WIXBUG:6299 - Fix OverflowException in ReadUInt32.
Browse files Browse the repository at this point in the history
  • Loading branch information
rseanhall committed Dec 14, 2020
1 parent 2ed6d79 commit 4f4b7d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions history/6299.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* SeanHall: WIXBUG:6299 - Fix OverflowException in ReadUInt32.
2 changes: 1 addition & 1 deletion src/tools/wix/BurnCommon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ private static UInt16 ReadUInt16(byte[] bytes, UInt32 offset)
private static UInt32 ReadUInt32(byte[] bytes, UInt32 offset)
{
Debug.Assert(offset + 4 <= bytes.Length);
return (UInt32)(bytes[offset] + (bytes[offset + 1] << 8) + (bytes[offset + 2] << 16) + (bytes[offset + 3] << 24));
return BurnCommon.ReadUInt16(bytes, offset) + ((UInt32)(BurnCommon.ReadUInt16(bytes, offset + 2)) << 16);
}

/// <summary>
Expand Down

0 comments on commit 4f4b7d9

Please sign in to comment.