diff --git a/AK/ByteBuffer.h b/AK/ByteBuffer.h index 3f8a245fdd7..af5f98823d1 100644 --- a/AK/ByteBuffer.h +++ b/AK/ByteBuffer.h @@ -211,6 +211,9 @@ public: void append(const void* data, size_t data_size) { + if (data_size == 0) + return; + ASSERT(data != nullptr); int old_size = size(); grow(size() + data_size); __builtin_memcpy(this->data() + old_size, data, data_size);