2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

Fill in host and port pointers on success.

This commit is contained in:
Todd C. Miller
2019-11-04 13:28:09 -07:00
parent 4c54e61ea9
commit 2949d2c47b

View File

@@ -35,7 +35,7 @@
/*
* Parse a string in the form host[:port] where host can also be
* an IPv4 address or an IPv6 address in square brackets.
* Modifies str.
* Fills in hostp and portp which may point within str, which is modified.
*/
bool
sudo_parse_host_port_v1(char *str, char **hostp, char **portp, char *defport)
@@ -72,6 +72,9 @@ sudo_parse_host_port_v1(char *str, char **hostp, char **portp, char *defport)
if (port == NULL)
port = defport;
*hostp = host;
*portp = port;
ret = true;
done: