![](https://seccdn.libravatar.org/avatar/128a7b98d536a9cf9b4d4d5a90d63475.jpg?s=120&d=mm&r=g)
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package aws-crt-cpp for openSUSE:Factory checked in at 2024-06-03 17:41:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/aws-crt-cpp (Old) and /work/SRC/openSUSE:Factory/.aws-crt-cpp.new.24587 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "aws-crt-cpp" Mon Jun 3 17:41:13 2024 rev:6 rq:1177905 version:0.26.9 Changes: -------- --- /work/SRC/openSUSE:Factory/aws-crt-cpp/aws-crt-cpp.changes 2024-05-22 21:32:26.513902103 +0200 +++ /work/SRC/openSUSE:Factory/.aws-crt-cpp.new.24587/aws-crt-cpp.changes 2024-06-03 17:41:21.066335246 +0200 @@ -1,0 +2,8 @@ +Wed May 22 13:52:30 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com> + +- Update to version 0.26.9 + - Fix memory leak when UnsubscribePacket is reused by @sfod in (#617) + - Fix order of arguments when calling aws_aes_gcm_256_new by @sbiscigl in (#618) + - Symmetric cipher state by @sbiscigl in (#619) + +------------------------------------------------------------------- Old: ---- v0.26.8.tar.gz New: ---- v0.26.9.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ aws-crt-cpp.spec ++++++ --- /var/tmp/diff_new_pack.zq8WN2/_old 2024-06-03 17:41:21.962368123 +0200 +++ /var/tmp/diff_new_pack.zq8WN2/_new 2024-06-03 17:41:21.962368123 +0200 @@ -20,7 +20,7 @@ %define library_soversion 1 Name: aws-crt-cpp -Version: 0.26.8 +Version: 0.26.9 Release: 0 Summary: AWS C++ wrapper for AWS SDK C libraries License: Apache-2.0 ++++++ v0.26.8.tar.gz -> v0.26.9.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-crt-cpp-0.26.8/VERSION new/aws-crt-cpp-0.26.9/VERSION --- old/aws-crt-cpp-0.26.8/VERSION 2024-04-12 22:46:53.000000000 +0200 +++ new/aws-crt-cpp-0.26.9/VERSION 2024-05-20 20:08:37.000000000 +0200 @@ -1 +1 @@ -0.26.8 +0.26.9 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-crt-cpp-0.26.8/include/aws/crt/Types.h new/aws-crt-cpp-0.26.9/include/aws/crt/Types.h --- old/aws-crt-cpp-0.26.8/include/aws/crt/Types.h 2024-04-12 22:46:53.000000000 +0200 +++ new/aws-crt-cpp-0.26.9/include/aws/crt/Types.h 2024-05-20 20:08:37.000000000 +0200 @@ -57,6 +57,7 @@ AWS_CRT_CPP_API ByteBuf ByteBufFromEmptyArray(const uint8_t *array, size_t len) noexcept; AWS_CRT_CPP_API ByteBuf ByteBufFromArray(const uint8_t *array, size_t capacity) noexcept; AWS_CRT_CPP_API ByteBuf ByteBufNewCopy(Allocator *alloc, const uint8_t *array, size_t len); + AWS_CRT_CPP_API ByteBuf ByteBufInit(Allocator *alloc, size_t len); AWS_CRT_CPP_API void ByteBufDelete(ByteBuf &); AWS_CRT_CPP_API ByteCursor ByteCursorFromCString(const char *str) noexcept; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-crt-cpp-0.26.8/include/aws/crt/crypto/SymmetricCipher.h new/aws-crt-cpp-0.26.9/include/aws/crt/crypto/SymmetricCipher.h --- old/aws-crt-cpp-0.26.8/include/aws/crt/crypto/SymmetricCipher.h 2024-04-12 22:46:53.000000000 +0200 +++ new/aws-crt-cpp-0.26.9/include/aws/crt/crypto/SymmetricCipher.h 2024-05-20 20:08:37.000000000 +0200 @@ -3,6 +3,7 @@ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ +#include <aws/cal/symmetric_cipher.h> #include <aws/crt/Exports.h> #include <aws/crt/Types.h> @@ -17,6 +18,13 @@ static const size_t AES_256_CIPHER_BLOCK_SIZE = 16u; static const size_t AES_256_KEY_SIZE_BYTES = 32u; + enum class SymmetricCipherState + { + Ready = AWS_SYMMETRIC_CIPHER_READY, + Finalized = AWS_SYMMETRIC_CIPHER_FINALIZED, + Error = AWS_SYMMETRIC_CIPHER_ERROR, + }; + class AWS_CRT_CPP_API SymmetricCipher final { public: @@ -72,6 +80,12 @@ operator bool() const noexcept; /** + * Returns current state of the cipher instance. ready to be used, finalized, or in a error state. + * If the cipher is in a finalized or error state it may not be used anymore + **/ + SymmetricCipherState GetState() const noexcept; + + /** * Returns the value of the last aws error encountered by operations on this instance. */ inline int LastError() const noexcept { return m_lastError; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-crt-cpp-0.26.8/source/Types.cpp new/aws-crt-cpp-0.26.9/source/Types.cpp --- old/aws-crt-cpp-0.26.8/source/Types.cpp 2024-04-12 22:46:53.000000000 +0200 +++ new/aws-crt-cpp-0.26.9/source/Types.cpp 2024-05-20 20:08:37.000000000 +0200 @@ -30,6 +30,13 @@ return retVal; } + ByteBuf ByteBufInit(Allocator *alloc, size_t len) + { + ByteBuf buff; + aws_byte_buf_init(&buff, alloc, len); + return buff; + } + void ByteBufDelete(ByteBuf &buf) { aws_byte_buf_clean_up(&buf); } ByteCursor ByteCursorFromCString(const char *str) noexcept { return aws_byte_cursor_from_c_str(str); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-crt-cpp-0.26.8/source/crypto/SymmetricCipher.cpp new/aws-crt-cpp-0.26.9/source/crypto/SymmetricCipher.cpp --- old/aws-crt-cpp-0.26.8/source/crypto/SymmetricCipher.cpp 2024-04-12 22:46:53.000000000 +0200 +++ new/aws-crt-cpp-0.26.9/source/crypto/SymmetricCipher.cpp 2024-05-20 20:08:37.000000000 +0200 @@ -5,8 +5,6 @@ #include <aws/crt/Api.h> #include <aws/crt/crypto/SymmetricCipher.h> -#include <aws/cal/symmetric_cipher.h> - namespace Aws { namespace Crt @@ -27,6 +25,15 @@ return m_cipher != nullptr ? aws_symmetric_cipher_is_good(m_cipher.get()) : false; } + SymmetricCipherState SymmetricCipher::GetState() const noexcept + { + if (m_cipher == nullptr) + { + return SymmetricCipherState::Error; + } + return static_cast<SymmetricCipherState>(aws_symmetric_cipher_get_state(m_cipher.get())); + } + bool SymmetricCipher::Encrypt(const ByteCursor &toEncrypt, ByteBuf &out) noexcept { if (!*this) @@ -152,8 +159,8 @@ allocator, key.has_value() ? &key.value() : nullptr, iv.has_value() ? &iv.value() : nullptr, - tag.has_value() ? &tag.value() : nullptr, - aad.has_value() ? &aad.value() : nullptr)}; + aad.has_value() ? &aad.value() : nullptr, + tag.has_value() ? &tag.value() : nullptr)}; } SymmetricCipher SymmetricCipher::CreateAES_256_KeyWrap_Cipher( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-crt-cpp-0.26.8/source/mqtt/Mqtt5Packets.cpp new/aws-crt-cpp-0.26.9/source/mqtt/Mqtt5Packets.cpp --- old/aws-crt-cpp-0.26.8/source/mqtt/Mqtt5Packets.cpp 2024-04-12 22:46:53.000000000 +0200 +++ new/aws-crt-cpp-0.26.9/source/mqtt/Mqtt5Packets.cpp 2024-05-20 20:08:37.000000000 +0200 @@ -138,7 +138,7 @@ const Crt::Vector<String> &stringVector, Allocator *allocator) { - AWS_ZERO_STRUCT(dst); + aws_array_list_clean_up(&dst); if (aws_array_list_init_dynamic(&dst, allocator, stringVector.size(), sizeof(aws_byte_cursor)) != AWS_OP_SUCCESS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-crt-cpp-0.26.8/tests/CMakeLists.txt new/aws-crt-cpp-0.26.9/tests/CMakeLists.txt --- old/aws-crt-cpp-0.26.8/tests/CMakeLists.txt 2024-04-12 22:46:53.000000000 +0200 +++ new/aws-crt-cpp-0.26.9/tests/CMakeLists.txt 2024-05-20 20:08:37.000000000 +0200 @@ -235,6 +235,7 @@ add_net_test_case(Mqtt5NullPublish) add_net_test_case(Mqtt5NullSubscribe) add_net_test_case(Mqtt5NullUnsubscribe) + add_net_test_case(Mqtt5ReuseUnsubscribePacket) add_net_test_case(Mqtt5QoS1SubPub) add_net_test_case(Mqtt5RetainSetAndClear) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-crt-cpp-0.26.8/tests/Mqtt5ClientTest.cpp new/aws-crt-cpp-0.26.9/tests/Mqtt5ClientTest.cpp --- old/aws-crt-cpp-0.26.8/tests/Mqtt5ClientTest.cpp 2024-04-12 22:46:53.000000000 +0200 +++ new/aws-crt-cpp-0.26.9/tests/Mqtt5ClientTest.cpp 2024-05-20 20:08:37.000000000 +0200 @@ -2285,6 +2285,34 @@ } AWS_TEST_CASE(Mqtt5NullUnsubscribe, s_TestMqtt5NullUnsubscribe) +/* + * Reuse unsubscribe packet test. + * The scenario in this test once caused memory leak, so the test ensures the issue is fixed for good. + */ +static int s_TestMqtt5ReuseUnsubscribePacket(Aws::Crt::Allocator *allocator, void *) +{ + ApiHandle apiHandle(allocator); + + const String TEST_TOPIC = "test/s_TestMqtt5NullUnsubscribe" + Aws::Crt::UUID().ToString(); + + Mqtt5::Mqtt5ClientOptions mqtt5Options(allocator); + mqtt5Options.WithHostName("www.example.com").WithPort(1111); + std::shared_ptr<Mqtt5::Mqtt5Client> mqtt5Client = Mqtt5::Mqtt5Client::NewMqtt5Client(mqtt5Options, allocator); + ASSERT_TRUE(mqtt5Client); + + Vector<String> unsubList{TEST_TOPIC}; + std::shared_ptr<Mqtt5::UnsubscribePacket> unsubscribe = std::make_shared<Mqtt5::UnsubscribePacket>(allocator); + unsubscribe->WithTopicFilters(unsubList); + ASSERT_TRUE(mqtt5Client->Unsubscribe(unsubscribe)); + /* Unsubscribe once again using the same UnsubscribePacket. */ + ASSERT_TRUE(mqtt5Client->Unsubscribe(unsubscribe)); + + ASSERT_TRUE(mqtt5Client->Stop()); + + return AWS_OP_SUCCESS; +} +AWS_TEST_CASE(Mqtt5ReuseUnsubscribePacket, s_TestMqtt5ReuseUnsubscribePacket) + ////////////////////////////////////////////////////////// // QoS1 Test Cases [QoS1-UC] ////////////////////////////////////////////////////////// diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-crt-cpp-0.26.8/tests/SymmetricCipherTest.cpp new/aws-crt-cpp-0.26.9/tests/SymmetricCipherTest.cpp --- old/aws-crt-cpp-0.26.8/tests/SymmetricCipherTest.cpp 2024-04-12 22:46:53.000000000 +0200 +++ new/aws-crt-cpp-0.26.9/tests/SymmetricCipherTest.cpp 2024-05-20 20:08:37.000000000 +0200 @@ -16,6 +16,7 @@ auto cbcCipher = Aws::Crt::Crypto::SymmetricCipher::CreateAES_256_CBC_Cipher(); ASSERT_TRUE(cbcCipher); + ASSERT_TRUE(cbcCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Ready); auto input = aws_byte_cursor_from_c_str("abc"); @@ -23,17 +24,22 @@ auto outputBuf = Aws::Crt::ByteBufFromEmptyArray(output, sizeof(output)); ASSERT_TRUE(cbcCipher.Encrypt(input, outputBuf)); + ASSERT_TRUE(cbcCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Ready); ASSERT_TRUE(cbcCipher.FinalizeEncryption(outputBuf)); + ASSERT_TRUE(cbcCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Finalized); ASSERT_FALSE(cbcCipher); ASSERT_TRUE(cbcCipher.Reset()); + ASSERT_TRUE(cbcCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Ready); auto decryptInput = Aws::Crt::ByteCursorFromByteBuf(outputBuf); outputBuf.len = 0; ASSERT_TRUE(cbcCipher.Decrypt(decryptInput, outputBuf)); + ASSERT_TRUE(cbcCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Ready); ASSERT_TRUE(cbcCipher.FinalizeDecryption(outputBuf)); + ASSERT_TRUE(cbcCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Finalized); ASSERT_BIN_ARRAYS_EQUALS(input.ptr, input.len, outputBuf.buffer, outputBuf.len); @@ -48,6 +54,7 @@ uint8_t key[Aws::Crt::Crypto::AES_256_KEY_SIZE_BYTES] = {0xDD}; auto keyCur = Aws::Crt::ByteCursorFromArray(key, sizeof(key)); cbcCipher = Aws::Crt::Crypto::SymmetricCipher::CreateAES_256_CBC_Cipher(keyCur); + ASSERT_TRUE(cbcCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Ready); ASSERT_TRUE(cbcCipher); ASSERT_BIN_ARRAYS_EQUALS(keyCur.ptr, keyCur.len, cbcCipher.GetKey().ptr, cbcCipher.GetKey().len); ASSERT_UINT_EQUALS(Aws::Crt::Crypto::AES_256_CIPHER_BLOCK_SIZE, cbcCipher.GetIV().len); @@ -64,6 +71,7 @@ Aws::Crt::ApiHandle apiHandle(allocator); auto ctrCipher = Aws::Crt::Crypto::SymmetricCipher::CreateAES_256_CTR_Cipher(); ASSERT_TRUE(ctrCipher); + ASSERT_TRUE(ctrCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Ready); auto input = aws_byte_cursor_from_c_str("abc"); @@ -71,17 +79,22 @@ auto outputBuf = Aws::Crt::ByteBufFromEmptyArray(output, sizeof(output)); ASSERT_TRUE(ctrCipher.Encrypt(input, outputBuf)); + ASSERT_TRUE(ctrCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Ready); ASSERT_TRUE(ctrCipher.FinalizeEncryption(outputBuf)); + ASSERT_TRUE(ctrCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Finalized); ASSERT_FALSE(ctrCipher); ASSERT_TRUE(ctrCipher.Reset()); + ASSERT_TRUE(ctrCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Ready); auto decryptInput = Aws::Crt::ByteCursorFromByteBuf(outputBuf); outputBuf.len = 0; ASSERT_TRUE(ctrCipher.Decrypt(decryptInput, outputBuf)); + ASSERT_TRUE(ctrCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Ready); ASSERT_TRUE(ctrCipher.FinalizeDecryption(outputBuf)); + ASSERT_TRUE(ctrCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Finalized); ASSERT_BIN_ARRAYS_EQUALS(input.ptr, input.len, outputBuf.buffer, outputBuf.len); @@ -97,6 +110,7 @@ auto keyCur = Aws::Crt::ByteCursorFromArray(key, sizeof(key)); ctrCipher = Aws::Crt::Crypto::SymmetricCipher::CreateAES_256_CTR_Cipher(keyCur); ASSERT_TRUE(ctrCipher); + ASSERT_TRUE(ctrCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Ready); ASSERT_BIN_ARRAYS_EQUALS(keyCur.ptr, keyCur.len, ctrCipher.GetKey().ptr, ctrCipher.GetKey().len); ASSERT_UINT_EQUALS(Aws::Crt::Crypto::AES_256_CIPHER_BLOCK_SIZE, ctrCipher.GetIV().len); } @@ -112,6 +126,7 @@ Aws::Crt::ApiHandle apiHandle(allocator); auto gcmCipher = Aws::Crt::Crypto::SymmetricCipher::CreateAES_256_GCM_Cipher(); ASSERT_TRUE(gcmCipher); + ASSERT_TRUE(gcmCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Ready); auto input = aws_byte_cursor_from_c_str("abc"); @@ -119,17 +134,22 @@ auto outputBuf = Aws::Crt::ByteBufFromEmptyArray(output, sizeof(output)); ASSERT_TRUE(gcmCipher.Encrypt(input, outputBuf)); + ASSERT_TRUE(gcmCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Ready); ASSERT_TRUE(gcmCipher.FinalizeEncryption(outputBuf)); + ASSERT_TRUE(gcmCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Finalized); ASSERT_FALSE(gcmCipher); ASSERT_TRUE(gcmCipher.Reset()); + ASSERT_TRUE(gcmCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Ready); auto decryptInput = Aws::Crt::ByteCursorFromByteBuf(outputBuf); outputBuf.len = 0; ASSERT_TRUE(gcmCipher.Decrypt(decryptInput, outputBuf)); + ASSERT_TRUE(gcmCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Ready); ASSERT_TRUE(gcmCipher.FinalizeDecryption(outputBuf)); + ASSERT_TRUE(gcmCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Finalized); ASSERT_BIN_ARRAYS_EQUALS(input.ptr, input.len, outputBuf.buffer, outputBuf.len); @@ -146,6 +166,7 @@ auto keyCur = Aws::Crt::ByteCursorFromArray(key, sizeof(key)); gcmCipher = Aws::Crt::Crypto::SymmetricCipher::CreateAES_256_GCM_Cipher(keyCur); ASSERT_TRUE(gcmCipher); + ASSERT_TRUE(gcmCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Ready); ASSERT_BIN_ARRAYS_EQUALS(keyCur.ptr, keyCur.len, gcmCipher.GetKey().ptr, gcmCipher.GetKey().len); ASSERT_UINT_EQUALS(Aws::Crt::Crypto::AES_256_CIPHER_BLOCK_SIZE - 4, gcmCipher.GetIV().len); } @@ -161,6 +182,7 @@ Aws::Crt::ApiHandle apiHandle(allocator); auto keywrapCipher = Aws::Crt::Crypto::SymmetricCipher::CreateAES_256_KeyWrap_Cipher(); ASSERT_TRUE(keywrapCipher); + ASSERT_TRUE(keywrapCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Ready); auto input = aws_byte_cursor_from_c_str("abcdefghijklmnopqrstuvwxyz123456"); @@ -168,11 +190,14 @@ auto outputBuf = Aws::Crt::ByteBufFromEmptyArray(output, sizeof(output)); ASSERT_TRUE(keywrapCipher.Encrypt(input, outputBuf)); + ASSERT_TRUE(keywrapCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Ready); ASSERT_TRUE(keywrapCipher.FinalizeEncryption(outputBuf)); + ASSERT_TRUE(keywrapCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Finalized); ASSERT_FALSE(keywrapCipher); ASSERT_TRUE(keywrapCipher.Reset()); + ASSERT_TRUE(keywrapCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Ready); uint8_t decryptOutput[Aws::Crt::Crypto::AES_256_CIPHER_BLOCK_SIZE * 3] = {0}; auto decryptOutputBuf = Aws::Crt::ByteBufFromEmptyArray(decryptOutput, sizeof(decryptOutput)); @@ -180,7 +205,9 @@ auto decryptInput = Aws::Crt::ByteCursorFromByteBuf(outputBuf); ASSERT_TRUE(keywrapCipher.Decrypt(decryptInput, decryptOutputBuf)); + ASSERT_TRUE(keywrapCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Ready); ASSERT_TRUE(keywrapCipher.FinalizeDecryption(decryptOutputBuf)); + ASSERT_TRUE(keywrapCipher.GetState() == Aws::Crt::Crypto::SymmetricCipherState::Finalized); ASSERT_BIN_ARRAYS_EQUALS(input.ptr, input.len, decryptOutputBuf.buffer, decryptOutputBuf.len); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-crt-cpp-0.26.8/tests/TypesTest.cpp new/aws-crt-cpp-0.26.9/tests/TypesTest.cpp --- old/aws-crt-cpp-0.26.8/tests/TypesTest.cpp 2024-04-12 22:46:53.000000000 +0200 +++ new/aws-crt-cpp-0.26.9/tests/TypesTest.cpp 2024-05-20 20:08:37.000000000 +0200 @@ -119,3 +119,21 @@ } AWS_TEST_CASE(TestByteCursorArrayListToVector, s_byte_cursor_array_list_to_vector) + +static int s_byte_buff_init_delete(struct aws_allocator *allocator, void *ctx) +{ + (void)ctx; + { + Aws::Crt::ApiHandle apiHandle(allocator); + const auto targetLength = 8; + auto byteBuff = ByteBufInit(allocator, targetLength); + ASSERT_UINT_EQUALS(targetLength, byteBuff.len); + ASSERT_TRUE(byteBuff.buffer != nullptr); + ByteBufDelete(byteBuff); + ASSERT_UINT_EQUALS(targetLength, 0); + ASSERT_TRUE(byteBuff.buffer == nullptr); + return 0; + } +} + +AWS_TEST_CASE(TestByteBufInitDelete, s_byte_buff_init_delete)