tpm: Check that parse_byte_string() has data to parse
authorSimon Glass <sjg@chromium.org>
Sun, 23 Aug 2015 00:31:36 +0000 (18:31 -0600)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 10:19:17 +0000 (12:19 +0200)
commitf2276a63a7afdb2e14b9e833869d2a13e75bf269
tree8457a09fff736d6aea96276457d70c727de55763
parent7aee0e2549962effb4a7bab1086bbeb7525a9624
tpm: Check that parse_byte_string() has data to parse

Rather then crashing when there is no data, print an error. The error is
printed by the caller to parse_byte_string().

Acked-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
common/cmd_tpm.c