miniupnpd/nftnldr.c: init local var in update_portmapping()

see https://github.com/miniupnp/miniupnp/pull/607
rhost is not currently in use, but it might be some day.
This commit is contained in:
Thomas Bernard 2022-04-21 00:19:45 +02:00
parent 689d1fdd04
commit a6ca2b14c5
No known key found for this signature in database
GPG Key ID: DB511043A31ACAAF
1 changed files with 3 additions and 1 deletions

View File

@ -5,7 +5,7 @@
* (c) 2015 Tomofumi Hayashi
* (c) 2019 Sven Auhagen
* (c) 2019 Paul Chambers
* (c) 2020 Thomas Bernard
* (c) 2020-2022 Thomas Bernard
*
* This software is subject to the conditions detailed
* in the LICENCE file provided within the distribution.
@ -698,6 +698,8 @@ update_portmapping(const char * ifname, unsigned short eport, int proto,
d_printf(("update_portmapping()\n"));
iaddr_str[0] = '\0';
rhost[0] = '\0';
if (get_redirect_rule(NULL, eport, proto, iaddr_str, INET_ADDRSTRLEN, NULL, NULL, 0, rhost, INET_ADDRSTRLEN, NULL, 0, 0) < 0)
return -1;