tunables: Terminate if end of input is reached (CVE-2023-4911)