Exploit database

GH-05cf3ce8b766a1bf27bf9a3c64392d57

0xxon/cve-2020-0601-utils

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2020-0601

29 sources

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

Repository files3
0xxon/cve-2020-0601-utilsRevision dced9cce3b3b

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

fast-hex/hex.h

Text · 1,194 bytes
#pragma once

#include <stdint.h>
#include <stddef.h>

#if defined(_MSC_VER)
#define __restrict__ __restrict  // The C99 keyword, available as a C++ extension
#endif

// Decoders
// Decode src hex string into dest bytes

// Scalar look-up table version. len is number of dest bytes (1/2 the size of src).
void decodeHexLUT(uint8_t* __restrict__ dest, const uint8_t* __restrict__ src, size_t len);

// Optimized scalar look-up table version (avoids a shift). len is number of dest bytes (1/2 the size of src).
void decodeHexLUT4(uint8_t* __restrict__ dest, const uint8_t* __restrict__ src, size_t len);

// Optimal AVX2 vectorized version. len is number of dest bytes (1/2 the size of src).
void decodeHexVec(uint8_t* __restrict__ dest, const uint8_t* __restrict__ src, size_t len);

// Encoders
// Encode src bytes into dest hex string

// Scalar version. len is number of src bytes. dest must be twice the size of src.
void encodeHex(uint8_t* __restrict__ dest, const uint8_t* __restrict__ src, size_t len);

// AVX2 vectorized version. len is number of src bytes. dest must be twice the size of src.
void encodeHexVec(uint8_t* __restrict__ dest, const uint8_t* __restrict__ src, size_t len);