diff options
| author | Tom Rini <[email protected]> | 2024-03-07 11:56:35 -0500 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-03-07 11:56:35 -0500 |
| commit | beedf675b36841ce1e077779157a87a6505317e6 (patch) | |
| tree | 502696b12f908d1436d3248ee7bc07fd313c73fc /common | |
| parent | 6eb682bc7ea398fad4aadb612c690884e73edc03 (diff) | |
| parent | 6ec3f9208948b4f3aa4b6d8362c0daaffaea0a0f (diff) | |
Merge branch '2024-03-07-assorted-fixes' into next
- Add phytec am64x platform, update am65-cpsw and a few other assorted
fixes.
Diffstat (limited to 'common')
| -rw-r--r-- | common/autoboot.c | 3 | ||||
| -rw-r--r-- | common/hash.c | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/common/autoboot.c b/common/autoboot.c index 5d331991c19..6f0aeae6bf3 100644 --- a/common/autoboot.c +++ b/common/autoboot.c @@ -167,6 +167,9 @@ static int passwd_abort_sha256(uint64_t etime) sha_env_str = AUTOBOOT_STOP_STR_SHA256; presskey = malloc_cache_aligned(DELAY_STOP_STR_MAX_LENGTH); + if (!presskey) + return -ENOMEM; + c = strstr(sha_env_str, ":"); if (c && (c - sha_env_str < DELAY_STOP_STR_MAX_LENGTH)) { /* preload presskey with salt */ diff --git a/common/hash.c b/common/hash.c index e837c56d443..3d6b84de473 100644 --- a/common/hash.c +++ b/common/hash.c @@ -321,7 +321,8 @@ static struct hash_algo hash_algo[] = { /* Try to minimize code size for boards that don't want much hashing */ #if CONFIG_IS_ENABLED(SHA256) || IS_ENABLED(CONFIG_CMD_SHA1SUM) || \ CONFIG_IS_ENABLED(CRC32_VERIFY) || IS_ENABLED(CONFIG_CMD_HASH) || \ - CONFIG_IS_ENABLED(SHA384) || CONFIG_IS_ENABLED(SHA512) + CONFIG_IS_ENABLED(SHA384) || CONFIG_IS_ENABLED(SHA512) || \ + IS_ENABLED(CONFIG_CMD_MD5SUM) #define multi_hash() 1 #else #define multi_hash() 0 @@ -404,7 +405,8 @@ int hash_block(const char *algo_name, const void *data, unsigned int len, } #if !defined(CONFIG_SPL_BUILD) && (defined(CONFIG_CMD_HASH) || \ - defined(CONFIG_CMD_SHA1SUM) || defined(CONFIG_CMD_CRC32)) + defined(CONFIG_CMD_SHA1SUM) || defined(CONFIG_CMD_CRC32)) || \ + defined(CONFIG_CMD_MD5SUM) /** * store_result: Store the resulting sum to an address or variable * @@ -565,7 +567,7 @@ int hash_command(const char *algo_name, int flags, struct cmd_tbl *cmdtp, /* Try to avoid code bloat when verify is not needed */ #if defined(CONFIG_CRC32_VERIFY) || defined(CONFIG_SHA1SUM_VERIFY) || \ - defined(CONFIG_HASH_VERIFY) + defined(CONFIG_MD5SUM_VERIFY) || defined(CONFIG_HASH_VERIFY) if (flags & HASH_FLAG_VERIFY) { #else if (0) { |
