mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-05 12:39:01 +08:00
13 lines
563 B
Diff
13 lines
563 B
Diff
|
diff --git a/src/core/lib/slice/slice.cc b/src/core/lib/slice/slice.cc
|
||
|
index eebf66b..6c6ee50 100644
|
||
|
--- a/src/core/lib/slice/slice.cc
|
||
|
+++ b/src/core/lib/slice/slice.cc
|
||
|
@@ -220,6 +220,7 @@ grpc_slice grpc_slice_from_moved_buffer(grpc_core::UniquePtr<char> p,
|
||
|
size_t len) {
|
||
|
uint8_t* ptr = reinterpret_cast<uint8_t*>(p.get());
|
||
|
grpc_slice slice;
|
||
|
+ memset(&slice, 0, sizeof(grpc_slice));
|
||
|
if (len <= sizeof(slice.data.inlined.bytes)) {
|
||
|
slice.refcount = nullptr;
|
||
|
slice.data.inlined.length = len;
|