File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -244,9 +244,11 @@ void ctr_drbg_entropy_usage( )
244
244
}
245
245
TEST_ASSERT( last_idx == test_offset_idx );
246
246
247
- /* Call update with too much data (sizeof entropy > MAX(_SEED)_INPUT)
248
- * (just make sure it doesn't cause memory corruption) */
249
- mbedtls_ctr_drbg_update( &ctx, entropy, sizeof( entropy ) );
247
+ /* Call update with too much data (sizeof entropy > MAX(_SEED)_INPUT).
248
+ * Make sure it's detected as an error and doesn't cause memory
249
+ * corruption. */
250
+ TEST_ASSERT( mbedtls_ctr_drbg_update_ret(
251
+ &ctx, entropy, sizeof( entropy ) ) != 0 );
250
252
251
253
/* Now enable PR, so the next few calls should all reseed */
252
254
mbedtls_ctr_drbg_set_prediction_resistance( &ctx, MBEDTLS_CTR_DRBG_PR_ON );
You can’t perform that action at this time.
0 commit comments