Skip to content

Commit 6f4c696

Browse files
Add assertions around BIO method setters
1 parent a866c11 commit 6f4c696

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ssl/ssl_test.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10473,13 +10473,13 @@ TEST(SSLTest, IntermittentEmptyRead) {
1047310473
// Create a fake read BIO that returns 0 on read to simulate empty read
1047410474
bssl::UniquePtr<BIO_METHOD> method(BIO_meth_new(0, nullptr));
1047510475
ASSERT_TRUE(method);
10476-
BIO_meth_set_create(method.get(), [](BIO *b) -> int {
10476+
ASSERT_TRUE(BIO_meth_set_create(method.get(), [](BIO *b) -> int {
1047710477
BIO_set_init(b, 1);
1047810478
return 1;
10479-
});
10480-
BIO_meth_set_read(method.get(), [](BIO *, char *, int) -> int {
10479+
}));
10480+
ASSERT_TRUE(BIO_meth_set_read(method.get(), [](BIO *, char *, int) -> int {
1048110481
return 0;
10482-
});
10482+
}));
1048310483
bssl::UniquePtr<BIO> rbio_empty(BIO_new(method.get()));
1048410484
ASSERT_TRUE(rbio_empty);
1048510485
BIO_set_flags(rbio_empty.get(), BIO_FLAGS_READ);

0 commit comments

Comments
 (0)