diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/settings.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/settings.c b/src/core/settings.c index df4fe9fcd..bfe618d91 100644 --- a/src/core/settings.c +++ b/src/core/settings.c @@ -2165,8 +2165,8 @@ static int format_md5_setting ( const struct setting_type *type __unused, struct md5_context ctx; uint8_t digest[MD5_DIGEST_SIZE]; - if ( len < MD5_DIGEST_SIZE ) - return -ENOSPC; + if ( len < MD5_DIGEST_SIZE * 2 ) + return MD5_DIGEST_SIZE * 2; digest_init ( &md5_algorithm, &ctx ); digest_update ( &md5_algorithm, &ctx, raw, raw_len ); digest_final ( &md5_algorithm, &ctx, digest ); |
