Exploit databaseDownload repository ZIP
GH-88d8bc551618926a04536090300b4292
dungnm24/cve-2020-0796
Sources for CVE-2020-0796
81 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files11
dungnm24/cve-2020-0796Revision fe7aebbe1789
- ↑..Parent directory
- Asn1Attribute.cs
- Asn1ChoiceElement.cs
- Asn1ChoiceIndex.cs
- Asn1Constraint.cs
- Asn1EnumeratedElement.cs
- Asn1Extension.cs
- Asn1Field.cs
- Asn1IntegerBound.cs
- Asn1SizeConstraint.cs
- Asn1StringConstraint.cs
- Asn1Tag.cs
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
WindowsProtocolTestSuites/ProtoSDK/Asn1Base/Attributes/Asn1IntegerBound.cs
C# · 2,105 bytes// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
namespace Microsoft.Protocols.TestTools.StackSdk.Asn1
{
/// <summary>
/// Spcifies the bounds of an INTEGER.
/// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class Asn1IntegerBound : Asn1Constraint
{
private long max, min;
private bool hasMax, hasMin;
/// <summary>
/// Initializes a new instance of the Asn1IntegerBound class that doesn't have max and min bounds.
/// </summary>
public Asn1IntegerBound()
{
hasMax = false;
hasMin = false;
}
/// <summary>
/// Gets a bool indicates whether an max bound is defined.
/// </summary>
public bool HasMax { get { return hasMax; } }
/// <summary>
/// Gets a bool indicates whether a min bound is defined.
/// </summary>
public bool HasMin { get { return hasMin; } }
/// <summary>
/// Gets or sets the max bound of an INTEGER.
/// </summary>
public long Max
{
get
{
if (!HasMax)
{
throw new Asn1InvalidOperation("Max Bound is not set.");
}
return max;
}
set
{
max = value;
hasMax = true;
}
}
/// <summary>
/// Gets or sets the min bound of an INTEGER.
/// </summary>
public long Min
{
get
{
if (!HasMin)
{
throw new Asn1InvalidOperation("Min Bound is not set.");
}
return min;
}
set
{
min = value;
hasMin = true;
}
}
}
}