pull/8052/head
Vizerai 9 years ago
parent 12d1fc61d8
commit cb849ef58f
  1. 1
      src/core/ext/census/trace_context.c
  2. 3
      test/core/census/trace_context_test.c

@ -69,6 +69,7 @@ bool decode_trace_context(google_trace_TraceContext *ctxt, uint8_t *buffer,
if (!status) {
gpr_log(GPR_DEBUG, "TraceContext decoding failed: %s",
PB_GET_ERROR(&stream));
return false;
}
// check fields

@ -189,7 +189,8 @@ static void test_corrupt() {
ctxt1.is_sampled = true;
msg_length = encode_trace_context(&ctxt1, buffer, sizeof(buffer));
// Corrupt some bytes.
/* Corrupt some bytes. 255 (0xFF) should be illegal for the first byte of the
proto encoded object. */
buffer[0] = 255;
bool res = validate_decode_context(&ctxt1, buffer, msg_length);

Loading…
Cancel
Save