mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-06-20 17:18:12 +00:00
Prevent leaking plaintext in psa_cipher_finish()
This commit is contained in:
parent
315b51c22d
commit
279ab8e69b
|
@ -2463,6 +2463,7 @@ psa_status_t psa_cipher_finish( psa_cipher_operation_t *operation,
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mbedtls_zeroize( temp_output_buffer, sizeof( temp_output_buffer ) );
|
||||||
status = psa_cipher_abort( operation );
|
status = psa_cipher_abort( operation );
|
||||||
|
|
||||||
return( status );
|
return( status );
|
||||||
|
@ -2471,6 +2472,7 @@ error:
|
||||||
|
|
||||||
*output_length = 0;
|
*output_length = 0;
|
||||||
|
|
||||||
|
mbedtls_zeroize( temp_output_buffer, sizeof( temp_output_buffer ) );
|
||||||
(void) psa_cipher_abort( operation );
|
(void) psa_cipher_abort( operation );
|
||||||
|
|
||||||
return( status );
|
return( status );
|
||||||
|
|
Loading…
Reference in a new issue