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