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)
committerSimon Glass <sjg@chromium.org>
Mon, 31 Aug 2015 13:57:28 +0000 (07:57 -0600)
commit5c51d8aa0e87b0b057cf3aad6d57e89ba3aed933
treec9e660dd5935f2c0766f70ed0cc3a41fdeb84106
parent21baf15b4e638cf7719994fe6ac86e0d0e93aa78
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