mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-23 12:30:50 +01:00
CA-348139: Don't exclude zero bytes from the checksum calculation during manifest verification.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
3f5b11048f
commit
0b0d6973ba
@ -84,13 +84,10 @@ namespace XenCenterLib
|
||||
if (bytesRead <= 0)
|
||||
break;
|
||||
|
||||
if (buffer.Any(b => b != 0x0))
|
||||
if (offset + bytesRead < limit)
|
||||
{
|
||||
if (offset + bytesRead < limit)
|
||||
{
|
||||
// This is not the last block. Compute the partial hash.
|
||||
hashAlgorithm.TransformBlock(buffer, 0, bytesRead, buffer, 0);
|
||||
}
|
||||
// This is not the last block. Compute the partial hash.
|
||||
hashAlgorithm.TransformBlock(buffer, 0, bytesRead, buffer, 0);
|
||||
}
|
||||
|
||||
offset += bytesRead;
|
||||
|
Loading…
Reference in New Issue
Block a user