Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
fuzz_defs.h
Go to the documentation of this file.
1#pragma once
34#include <stddef.h>
35#include <stdint.h>
36
37#include "exceptions.h" /* try_context_t */
38
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
73#define FUZZ_CTRL_LEN 4
74
89#define FUZZ_STRUCTURED_LANE_THRESHOLD 102
90
92#define FUZZ_CMD_HAS_DATA (1u << 0)
93
95typedef struct {
96 uint8_t cla;
97 uint8_t ins;
98 uint8_t p1_max;
99 uint8_t p2_max;
100 uint8_t flags;
102
104#define FUZZ_COMMAND_COUNT() \
105 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:95
uint8_t flags
Bitfield of FUZZ_CMD_* flags.
Definition fuzz_defs.h:100
uint8_t p2_max
Upper bound for P2 (0 = full range [0,255]).
Definition fuzz_defs.h:99
uint8_t p1_max
Upper bound for P1 (0 = full range [0,255]).
Definition fuzz_defs.h:98
uint8_t ins
APDU instruction byte.
Definition fuzz_defs.h:97
uint8_t cla
APDU class byte.
Definition fuzz_defs.h:96