forked from DiscUtils/DiscUtils
-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VHDX LogEntry.TryRead() Bug Fix and Improvements
Change LogEntryHeader member variables to properties. Read header into 64-byte, stackalloc'd buffer, then read remaining bytes directly into logEntryBuffer. Remove buggy byte availability calculation. Remove redundant signature check (which is done in LogEntryHeader.IsValid). Use ReadMaximum instread of ReadExactly to guarantee no exception will be thrown, and use its return value to verify correct byte count.
- Loading branch information
Showing
2 changed files
with
68 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters