mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-01 19:18:04 +00:00
Increase buffer construction requirements (#88)
* Fix crash in Buffer with null pointer and non-zero length * Throw inside Buffer constructor instead
This commit is contained in:
committed by
Matias Fontanini
parent
9a20b588c5
commit
b8f4be5e1b
@@ -15,6 +15,9 @@ TEST_CASE("conversions", "[buffer]") {
|
||||
const Buffer buffer(data);
|
||||
const Buffer empty_buffer;
|
||||
|
||||
SECTION("construction") {
|
||||
CHECK_THROWS_AS(Buffer((const char*)nullptr, 5), Exception);
|
||||
}
|
||||
|
||||
SECTION("bool conversion") {
|
||||
CHECK(!!buffer == true);
|
||||
|
||||
Reference in New Issue
Block a user