INNER CODE UNIT · Python

TestOneInput

cisco-open/forge · fuzz/trust_common_env_fuzzer.py:37

def TestOneInput(data: bytes) -> None:
    if len(data) > 4096:
        return

    text = data.decode('utf-8', errors='replace')
    if '\x00' in text:
        return

    os.environ[ENV_NAME] = text
    try:
        values = trust_common.parse_env_list(ENV_NAME)
        assert isinstance(values, list)
        assert all(isinstance(value, str) and value.strip()
                   for value in values)

        try:
            parsed_int = trust_common.parse_env_int(ENV_NAME, 10, -1000, 1000)
        except RuntimeError:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…