commit | e007c9fedeef22413e973278d87f744e9c07dc6f | [log] [tgz] |
---|---|---|
author | Janos Follath <janos.follath@arm.com> | Fri Feb 12 13:30:09 2016 +0000 |
committer | Simon Butcher <simon.butcher@arm.com> | Wed May 18 19:30:09 2016 +0100 |
tree | 8e3958683baabcefb95b270ac59cba8969f70060 | |
parent | b645c45865a9e74249b3d6c28984a72a03e65556 [diff] |
Removing 'if' branch from the fix. This new error shouldn't be distinguishable from other padding errors. Updating 'bad' instead of adding a new 'if' branch.
diff --git a/library/rsa.c b/library/rsa.c index 43dd2c0..33e673a 100644 --- a/library/rsa.c +++ b/library/rsa.c
@@ -855,8 +855,7 @@ bad |= *p++; /* Must be zero */ } - if( pad_count < 8 ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); + bad |= ( pad_count < 8 ); if( bad ) return( MBEDTLS_ERR_RSA_INVALID_PADDING );