Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
fuzz_defs.h
Go to the documentation of this file.
1#pragma once
33
34#include <stddef.h>
35#include <stdint.h>
36
37#include "exceptions.h" /* try_context_t */
38
47
49extern const uint8_t *fuzz_tail_ptr;
50
52extern size_t fuzz_tail_len;
53
60extern const size_t fuzz_absolution_prefix_size;
61
68extern try_context_t fuzz_exit_jump_ctx;
69
71
73#define FUZZ_CTRL_LEN 4
74
95#define FUZZ_STRUCTURED_LANE_THRESHOLD 102
96
98#define FUZZ_CMD_HAS_DATA (1u << 0)
99
101typedef struct {
102 uint8_t cla;
103 uint8_t ins;
104 uint8_t p1_max;
105 uint8_t p2_max;
106 uint8_t flags;
108
110#define FUZZ_COMMAND_COUNT() \
111 const size_t fuzz_n_commands = sizeof(fuzz_commands) / sizeof(fuzz_commands[0])
size_t fuzz_tail_len
Length of fuzz_tail_ptr in bytes.
const uint8_t * fuzz_tail_ptr
The APDU payload for the current iteration (NULL when empty).
try_context_t fuzz_exit_jump_ctx
longjmp landing pad the harness unwinds os_exit() through.
const size_t fuzz_absolution_prefix_size
Size in bytes of Absolution's sampled state prefix.
Describes one APDU command the harness may synthesise and dispatch.
Definition fuzz_defs.h:101
uint8_t flags
Bitfield of FUZZ_CMD_* flags.
Definition fuzz_defs.h:106
uint8_t p2_max
Upper bound for P2 (0 = full range [0,255]).
Definition fuzz_defs.h:105
uint8_t p1_max
Upper bound for P1 (0 = full range [0,255]).
Definition fuzz_defs.h:104
uint8_t ins
APDU instruction byte.
Definition fuzz_defs.h:103
uint8_t cla
APDU class byte.
Definition fuzz_defs.h:102