2020-02-12 08:33:48 +08:00
|
|
|
diff --git a/src/core/lib/slice/slice.cc b/src/core/lib/slice/slice.cc
|
2020-08-23 13:25:20 +08:00
|
|
|
index 0dacbfef3e..310bf1de1b 100644
|
2020-02-12 08:33:48 +08:00
|
|
|
--- a/src/core/lib/slice/slice.cc
|
|
|
|
+++ b/src/core/lib/slice/slice.cc
|
2020-08-23 13:25:20 +08:00
|
|
|
@@ -234,6 +234,7 @@ grpc_slice grpc_slice_from_moved_buffer(grpc_core::UniquePtr<char> p,
|
2020-02-12 08:33:48 +08:00
|
|
|
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;
|
2020-08-23 13:25:20 +08:00
|
|
|
@@ -253,7 +254,7 @@ grpc_slice grpc_slice_from_moved_string(grpc_core::UniquePtr<char> p) {
|
|
|
|
}
|
|
|
|
|
|
|
|
grpc_slice grpc_slice_from_cpp_string(std::string str) {
|
|
|
|
- grpc_slice slice;
|
|
|
|
+ grpc_slice slice = { 0 };
|
|
|
|
if (str.size() <= sizeof(slice.data.inlined.bytes)) {
|
|
|
|
slice.refcount = nullptr;
|
|
|
|
slice.data.inlined.length = str.size();
|
2020-06-24 05:36:26 +08:00
|
|
|
diff --git a/src/core/lib/surface/server.cc b/src/core/lib/surface/server.cc
|
2020-08-23 13:25:20 +08:00
|
|
|
index cab0cd56c4..2c88fd625b 100644
|
2020-06-24 05:36:26 +08:00
|
|
|
--- a/src/core/lib/surface/server.cc
|
|
|
|
+++ b/src/core/lib/surface/server.cc
|
2020-08-23 13:25:20 +08:00
|
|
|
@@ -1301,7 +1301,7 @@ grpc_call_error queue_call_request(grpc_server* server, size_t cq_idx,
|
2020-06-24 05:36:26 +08:00
|
|
|
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Server Shutdown"));
|
|
|
|
return GRPC_CALL_OK;
|
|
|
|
}
|
|
|
|
- RequestMatcherInterface* rm;
|
|
|
|
+ RequestMatcherInterface* rm = nullptr;
|
|
|
|
switch (rc->type) {
|
2020-08-23 13:25:20 +08:00
|
|
|
case RequestedCallType::BATCH_CALL:
|
|
|
|
rm = server->unregistered_request_matcher.get();
|