acpi/nfit: improve bounds checking for 'func'