Fix 1 forgotten separate input/output buffer

Signed-off-by: Chien Wong <m@xv97.com>
This commit is contained in:
Chien Wong 2024-01-25 19:22:50 +08:00
parent 92c17c456c
commit ef56795fd2
No known key found for this signature in database
GPG key ID: 5CA58A39FA4122AD

View file

@ -575,7 +575,7 @@ void gcm_input_len_too_long(void)
gcm_reset_ctx(&ctx, b16, sizeof(b16) * 8, b16, sizeof(b16), 0);
// Feed input that just exceeds the length limit in two calls
TEST_EQUAL(mbedtls_gcm_update(&ctx, b16, 1, out, 1, &out_len), 0);
TEST_EQUAL(mbedtls_gcm_update(&ctx, b16, len_max, b16, len_max, &out_len),
TEST_EQUAL(mbedtls_gcm_update(&ctx, b16, len_max, out, len_max, &out_len),
MBEDTLS_ERR_GCM_BAD_INPUT);
mbedtls_gcm_free(&ctx);