aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/transport
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-05-22 15:24:21 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-05-22 15:24:21 -0700
commit22cfb658464526d15b6b2ae603b798adf1941895 (patch)
tree28142174a3d12b44075e0312ea641e2372864a59 /src/core/lib/transport
parent62a0b5941b413a88e3589ec4b0191f6eb55e3b11 (diff)
parent336292d2f38b9883e2002f1f1c89704b971d62a6 (diff)
Merge github.com:grpc/grpc into error
Diffstat (limited to 'src/core/lib/transport')
-rw-r--r--src/core/lib/transport/metadata.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/lib/transport/metadata.c b/src/core/lib/transport/metadata.c
index 5847ec9053..82c8e239f6 100644
--- a/src/core/lib/transport/metadata.c
+++ b/src/core/lib/transport/metadata.c
@@ -373,7 +373,8 @@ grpc_mdstr *grpc_mdstr_from_buffer(const uint8_t *buf, size_t length) {
ss = g_static_strtab[idx];
if (ss == NULL) break;
if (ss->hash == hash && GPR_SLICE_LENGTH(ss->slice) == length &&
- 0 == memcmp(buf, GPR_SLICE_START_PTR(ss->slice), length)) {
+ (length == 0 ||
+ 0 == memcmp(buf, GPR_SLICE_START_PTR(ss->slice), length))) {
GPR_TIMER_END("grpc_mdstr_from_buffer", 0);
return ss;
}