File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1128,7 +1128,7 @@ static int km_pkcs1pad_sign(struct akcipher_request *req)
11281128 goto pkcs1pad_sign_out ;
11291129 }
11301130
1131- if (req -> src_len + hash_enc_len + RSA_MIN_PAD_SZ > ctx -> key_len ) {
1131+ if (( word64 ) req -> src_len + ( word64 ) hash_enc_len + RSA_MIN_PAD_SZ > ctx -> key_len ) {
11321132 err = - EOVERFLOW ;
11331133 goto pkcs1pad_sign_out ;
11341134 }
@@ -1378,7 +1378,7 @@ static int km_pkcs1_sign(struct crypto_sig *tfm,
13781378 goto pkcs1_sign_out ;
13791379 }
13801380
1381- if (slen + hash_enc_len + RSA_MIN_PAD_SZ > ctx -> key_len ) {
1381+ if (( word64 ) slen + ( word64 ) hash_enc_len + RSA_MIN_PAD_SZ > ctx -> key_len ) {
13821382 err = - EOVERFLOW ;
13831383 goto pkcs1_sign_out ;
13841384 }
@@ -1708,7 +1708,7 @@ static int km_pkcs1pad_enc(struct akcipher_request *req)
17081708 goto pkcs1_enc_out ;
17091709 }
17101710
1711- if (req -> src_len + RSA_MIN_PAD_SZ > ctx -> key_len ) {
1711+ if (( word64 ) req -> src_len + RSA_MIN_PAD_SZ > ctx -> key_len ) {
17121712 err = - EOVERFLOW ;
17131713 goto pkcs1_enc_out ;
17141714 }
You can’t perform that action at this time.
0 commit comments