]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_tpm.c
tpm: Check that parse_byte_string() has data to parse
[karo-tx-uboot.git] / common / cmd_tpm.c
index 65e7371e8074f6d3129218469fc6cb666067a2aa..e9c661821ce747e41ec099ba081fc32697035da6 100644 (file)
@@ -58,6 +58,8 @@ static void *parse_byte_string(char *bytes, uint8_t *data, size_t *count_ptr)
        size_t count, length;
        int i;
 
+       if (!bytes)
+               return NULL;
        length = strlen(bytes);
        count = length / 2;