Add check to make sure the size of the consent UI header is at least the size of the header as known for the platform/OS version

This commit is contained in:
Ryan Newington
2024-08-28 16:17:52 +10:00
parent 10505c8641
commit e4ddea5267
@@ -73,6 +73,11 @@ namespace Lithnet.CredentialProvider
{ {
throw new InvalidDataException($"The size of the data structure {this.header.Size} does not match the expected size {expectedSize}"); throw new InvalidDataException($"The size of the data structure {this.header.Size} does not match the expected size {expectedSize}");
} }
if (HeaderSize > this.header.Size)
{
throw new InvalidDataException($"The size of the data structure {this.header.Size} is less than the expected header size {HeaderSize}");
}
} }
/// <summary> /// <summary>