mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-10-15 21:27:24 +00:00
Complain about bad initialization of operation structures
In every existing test driver entry point that is the setup for a multipart
operation, check that the driver operation structure is all-bits-zero on
entry, as guaranteed by the driver specification.
There is a risk that this isn't the case, mostly, on platforms where
initializing a union to `{0}` initializes only the default member and not
all members.
Signed-off-by: Gilles Peskine <[email protected]>
This commit is contained in:
@@ -8,4 +8,10 @@
|
||||
|
||||
#include "mbedtls/build_info.h"
|
||||
|
||||
/** Error code that test drivers return when they detect that an input
|
||||
* parameter was not initialized properly. This normally indicates a
|
||||
* bug in the core.
|
||||
*/
|
||||
#define PSA_ERROR_TEST_DETECTED_BAD_INITIALIZATION ((psa_status_t)-0x0201)
|
||||
|
||||
#endif /* test_driver_common.h */
|
||||
|
||||
Reference in New Issue
Block a user