mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-04 16:25:25 +00:00
Fill in host and port pointers on success.
This commit is contained in:
@@ -35,7 +35,7 @@
|
|||||||
/*
|
/*
|
||||||
* Parse a string in the form host[:port] where host can also be
|
* Parse a string in the form host[:port] where host can also be
|
||||||
* an IPv4 address or an IPv6 address in square brackets.
|
* 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
|
bool
|
||||||
sudo_parse_host_port_v1(char *str, char **hostp, char **portp, char *defport)
|
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)
|
if (port == NULL)
|
||||||
port = defport;
|
port = defport;
|
||||||
|
|
||||||
|
*hostp = host;
|
||||||
|
*portp = port;
|
||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
Reference in New Issue
Block a user