We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 802ede3 commit 3317fc4Copy full SHA for 3317fc4
1 file changed
crypto/cipher_extra/cipher_test.cc
@@ -1500,6 +1500,11 @@ TEST(CipherTest, CopyErrorPathReleasesCipherData) {
1500
EXPECT_FALSE(EVP_CIPHER_CTX_copy(dst.get(), src.get()));
1501
EXPECT_EQ(dst->cipher, nullptr);
1502
EXPECT_EQ(dst->cipher_data, nullptr);
1503
+
1504
+ // A follow-up init with a real cipher on |dst| must still work and must not
1505
+ // depend on leaked state from the failed copy.
1506
+ EXPECT_TRUE(EVP_CipherInit_ex(dst.get(), EVP_aes_128_ecb(), nullptr,
1507
+ key.data(), nullptr, 1));
1508
}
1509
1510
struct CipherInfo {
0 commit comments