Skip to content

Commit

Permalink
uri-util: The uri_parse_host_name_dns() would segfault if the hostnam…
Browse files Browse the repository at this point in the history
…e_r parameter was NULL.
  • Loading branch information
stephanbosch authored and GitLab committed May 16, 2016
1 parent 9184983 commit f95afa9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/uri-util.c
Expand Up @@ -559,7 +559,8 @@ int uri_parse_host_name_dns(struct uri_parser *parser,
if ((ret=uri_do_parse_host_name_dns(parser, host_name)) <= 0)
return ret;

*host_name_r = str_c(host_name);
if (host_name_r != NULL)
*host_name_r = str_c(host_name);
return 1;
}

Expand Down

0 comments on commit f95afa9

Please sign in to comment.