Fix bug for small encrypted regions
This commit is contained in:
+5
-1
@@ -1056,6 +1056,10 @@ namespace LibIRD
|
||||
CountFiles(dirInfo);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Hashing
|
||||
|
||||
/// <summary>
|
||||
/// Calculate hashes for all region and file extents
|
||||
/// </summary>
|
||||
@@ -1201,7 +1205,7 @@ namespace LibIRD
|
||||
|
||||
// Don't decrypt last sectors if the encrypted region ends within this buffer
|
||||
if (RegionEnd[i] < currentSector + bufSectors)
|
||||
encCount -= (int)(currentSector + bufSectors - RegionEnd[i] + 1);
|
||||
encCount -= (int)(currentSector + bufSectors - RegionEnd[i] - 1);
|
||||
|
||||
// Decrypt encrypted sectors
|
||||
DecryptSectors(ref buf, (int)currentSector + encOffset, encOffset, encCount);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<LangVersion>latest</LangVersion>
|
||||
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<Version>0.7.1</Version>
|
||||
<Version>0.8.0</Version>
|
||||
<PackageOutputPath>../nupkg</PackageOutputPath>
|
||||
|
||||
<!-- Package Properties -->
|
||||
|
||||
Reference in New Issue
Block a user