OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
PeCoff.c File Reference
#include "../Include/Uefi.h"
#include <Library/BaseMemoryLib.h>
#include <Library/BaseOverflowLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/PeCoffLib2.h>
#include <Library/DebugLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <stdio.h>
#include <string.h>
#include <UserFile.h>
#include <UserMemory.h>

Go to the source code of this file.

Functions

STATIC BOOLEAN HashUpdate (IN OUT VOID *HashContext, IN CONST VOID *Data, IN UINTN DataLength)
 
STATIC EFI_STATUS PeCoffTestRtReloc (IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *Context)
 
STATIC EFI_STATUS PeCoffTestLoad (IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *Context, OUT VOID *Destination, IN UINT32 DestinationSize)
 
STATIC VOID LoadConfig (IN CONST UINT8 *Data, IN UINTN Size)
 
STATIC EFI_STATUS PeCoffTestLoadFull (IN CONST VOID *FileBuffer, IN UINT32 FileSize)
 
int LLVMFuzzerTestOneInput (const uint8_t *Data, size_t Size)
 
int ENTRY_POINT (int argc, char *argv[])
 

Variables

STATIC UINT64 mHashesMask = MAX_UINT64
 
STATIC UINTN mHashIndex = 0
 
STATIC UINTN mHashDependency
 

Detailed Description

Copyright (c) 2018, vit9696. All rights reserved. SPDX-License-Identifier: BSD-3-Clause

Definition in file PeCoff.c.

Function Documentation

◆ ENTRY_POINT()

int ENTRY_POINT ( int argc,
char * argv[] )

Definition at line 277 of file PeCoff.c.

◆ HashUpdate()

STATIC BOOLEAN HashUpdate ( IN OUT VOID * HashContext,
IN CONST VOID * Data,
IN UINTN DataLength )

Definition at line 27 of file PeCoff.c.

◆ LLVMFuzzerTestOneInput()

int LLVMFuzzerTestOneInput ( const uint8_t * Data,
size_t Size )

Definition at line 242 of file PeCoff.c.

◆ LoadConfig()

STATIC VOID LoadConfig ( IN CONST UINT8 * Data,
IN UINTN Size )

Definition at line 131 of file PeCoff.c.

◆ PeCoffTestLoad()

STATIC EFI_STATUS PeCoffTestLoad ( IN OUT PE_COFF_LOADER_IMAGE_CONTEXT * Context,
OUT VOID * Destination,
IN UINT32 DestinationSize )

Definition at line 92 of file PeCoff.c.

◆ PeCoffTestLoadFull()

STATIC EFI_STATUS PeCoffTestLoadFull ( IN CONST VOID * FileBuffer,
IN UINT32 FileSize )

Definition at line 188 of file PeCoff.c.

◆ PeCoffTestRtReloc()

STATIC EFI_STATUS PeCoffTestRtReloc ( IN OUT PE_COFF_LOADER_IMAGE_CONTEXT * Context)

Definition at line 59 of file PeCoff.c.

Variable Documentation

◆ mHashDependency

STATIC UINTN mHashDependency

Definition at line 23 of file PeCoff.c.

◆ mHashesMask

STATIC UINT64 mHashesMask = MAX_UINT64

Definition at line 21 of file PeCoff.c.

◆ mHashIndex

STATIC UINTN mHashIndex = 0

Definition at line 22 of file PeCoff.c.