cbtable.c: Factor out lb_header_validation logic

Write a pure function for the header validation logic, it is
easier to unit-test.

Change-Id: Ia288bcbc5c371329952a6efba30ccf0e18965a3d
Signed-off-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/37238
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
1 file changed