mirror of
https://github.com/openssl/openssl.git
synced 2024-12-09 05:51:54 +08:00
Fix BIO_dgram_pair stochastic test failure
Fixes #19267. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19268)
This commit is contained in:
parent
678b489a2a
commit
8e90a12ad8
@ -530,7 +530,7 @@ static int test_bio_dgram_pair(void)
|
||||
if (!TEST_int_eq(random_data(key, scratch, sizeof(scratch), i), 1))
|
||||
goto err;
|
||||
|
||||
blen = (*(uint32_t*)scratch) % mtu1;
|
||||
blen = ((*(uint32_t*)scratch) % mtu1) + 1;
|
||||
r = BIO_write(bio1, scratch + 4, blen);
|
||||
if (r == -1)
|
||||
break;
|
||||
@ -556,7 +556,7 @@ static int test_bio_dgram_pair(void)
|
||||
if (!TEST_int_eq(random_data(key, scratch, sizeof(scratch), i), 1))
|
||||
goto err;
|
||||
|
||||
blen = (*(uint32_t*)scratch) % mtu1;
|
||||
blen = ((*(uint32_t*)scratch) % mtu1) + 1;
|
||||
r = BIO_read(bio2, scratch2, sizeof(scratch2));
|
||||
if (!TEST_int_eq(r, blen))
|
||||
goto err;
|
||||
|
Loading…
Reference in New Issue
Block a user