Fix compile errors

pull/6897/head
Craig Tiller 9 years ago
parent f990101718
commit 7a1a389062
  1. 13
      test/core/bad_ssl/servers/cert.c
  2. 6
      test/core/util/one_corpus_entry_fuzzer.c

@ -52,16 +52,15 @@ int main(int argc, char **argv) {
grpc_server_credentials *ssl_creds;
grpc_server *server;
gpr_slice cert_slice, key_slice;
int ok;
grpc_init();
cert_slice =
gpr_load_file("src/core/lib/tsi/test_creds/badserver.pem", 1, &ok);
GPR_ASSERT(ok);
key_slice =
gpr_load_file("src/core/lib/tsi/test_creds/badserver.key", 1, &ok);
GPR_ASSERT(ok);
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"load_file", gpr_load_file("src/core/lib/tsi/test_creds/badserver.pem", 1,
&cert_slice)));
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"load_file", gpr_load_file("src/core/lib/tsi/test_creds/badserver.key", 1,
&key_slice)));
pem_key_cert_pair.private_key = (const char *)GPR_SLICE_START_PTR(key_slice);
pem_key_cert_pair.cert_chain = (const char *)GPR_SLICE_START_PTR(cert_slice);

@ -37,9 +37,9 @@
extern int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
int main(int argc, char **argv) {
int ok = 0;
gpr_slice buffer = gpr_load_file(argv[1], 0, &ok);
GPR_ASSERT(ok);
gpr_slice buffer;
GPR_ASSERT(
GRPC_LOG_IF_ERROR("load_file", gpr_load_file(argv[1], 0, &buffer)));
LLVMFuzzerTestOneInput(GPR_SLICE_START_PTR(buffer), GPR_SLICE_LENGTH(buffer));
gpr_slice_unref(buffer);
return 0;

Loading…
Cancel
Save