Unify environment variable handling
Author: nbarsCreated Oct 21, 2022Updated Feb 19, 2026
Labelshelp wantedgood first issue
Is your feature request related to a problem? Please describe.
Grepping through the code-base reveals many locations using getenv with hardcoded constants, even though there seems to be an interface (afl_env_vars_t) to unify the handling of environment variables. This makes it hard to keep track of which tool (afl-fuzz, afl-cmin, ...) implements which functionality.
Describe the solution you'd like
Unify environment variable handling by using afl_env_vars_t and related functions. This will require, besides other things, decoupling of read_afl_environment() from afl_state_t since afl_state_t is not used by all tools as far as I can tell.
Best, Nils
Source: AFLplusplus/AFLplusplus