Exploit database

GH-88d8bc551618926a04536090300b4292

dungnm24/cve-2020-0796

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2020-0796

81 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files54Next files →

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

WindowsProtocolTestSuites/ProtoSDK/MS-WSP/Structures/VT_COMPRESSED_LPWSTR.cs

C# · 1,418 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.FileAccessService.Wsp
{
    /// <summary>
    /// The VT_COMPRESSED_LPWSTR structure contains a compressed version of a null-terminated, 16-bit Unicode string.
    /// </summary>
    public struct VT_COMPRESSED_LPWSTR : IWspStructure
    {
        /// <summary>
        /// A 32-bit unsigned integer, indicating the number of characters in the compressed Unicode string, excluding the terminating null character.
        /// A value of 0x00000000 indicates that no such string is present.
        /// </summary>
        public uint ccLen;

        /// <summary>
        /// A sequence of bytes, each representing the lower byte of a two-byte Unicode character, where the higher byte of the character is always set to zero.
        /// Note that only the first 255 Unicode characters can be represented with this encoding scheme. This field MUST be absent if ccLen is set to 0x00000000.
        /// </summary>
        public byte[] bytes;

        public void FromBytes(WspBuffer buffer)
        {
            throw new NotImplementedException();
        }

        public void ToBytes(WspBuffer buffer)
        {
            buffer.Add(ccLen);

            buffer.AddRange(bytes);
        }
    }
}