tpmc: Use char sentinel in HexStringToUint32()
tpmc: Use char sentinel in HexStringToUint32()

HexStringToUint32() uses sscanf(), scanning in a hex value, and
capturing the tail as well to figure out if the user passed in too much.
Switch to using a char for that overflow detection rather than a string
to avoid stack corruption. For example:

localhost# tpmc pcrread 999999999999999999999
*** stack smashing detected ***: terminated
Aborted (core dumped)

BUG=None
BRANCH=main
TEST=stop trunksd; tpmc pcrread 999999999999999999999

Signed-off-by: Evan Green <e00bb247ee1d736884e1d54ef0d6b838cb86c075@chromium.org>
Change-Id: Idefec979d5cf6ab8a83da8654ed5591158807395
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2893695
Reviewed-by: Andrey Pronin <53bbebe6910b11f7aa2d1daaa466658eb4cba5f2@chromium.org>
Reviewed-by: Julius Werner <4d12f06cff3725783b352157673a720bc67c4afe@chromium.org>

coreboot/vboot,coreboot/vboot,coreboot/vboot,coreboot/vboot,coreboot/vboot