diff options
Diffstat (limited to 'crypto/cms/cms_pwri.c')
-rw-r--r-- | crypto/cms/cms_pwri.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/cms/cms_pwri.c b/crypto/cms/cms_pwri.c index a7d609f83791..ee1b8aa6ed61 100644 --- a/crypto/cms/cms_pwri.c +++ b/crypto/cms/cms_pwri.c @@ -242,7 +242,7 @@ static int kek_unwrap_key(unsigned char *out, size_t *outlen, /* Check byte failure */ goto err; } - if (inlen < (size_t)(tmp[0] - 4)) { + if (inlen < 4 + (size_t)tmp[0]) { /* Invalid length value */ goto err; } |