From: Wayne Keenan Date: Mon, 30 Apr 2018 07:03:35 +0000 (+0100) Subject: Fix potential NULL pointer dereference crash. X-Git-Tag: v3.1-beta1~183^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=be707f1c6b0a196489c98508f203abe6a0ca21e2;p=esp-idf Fix potential NULL pointer dereference crash. --- diff --git a/examples/protocols/mdns/main/mdns_example_main.c b/examples/protocols/mdns/main/mdns_example_main.c index 44984c2682..fb805545ab 100755 --- a/examples/protocols/mdns/main/mdns_example_main.c +++ b/examples/protocols/mdns/main/mdns_example_main.c @@ -137,7 +137,7 @@ static void mdns_print_results(mdns_result_t * results){ if(r->txt_count){ printf(" TXT : [%u] ", r->txt_count); for(t=0; ttxt_count; t++){ - printf("%s=%s; ", r->txt[t].key, r->txt[t].value); + printf("%s=%s; ", r->txt[t].key, r->txt[t].value?r->txt[t].value:"NULL"); } printf("\n"); }