From 409ba9c0f225f0aa6bb83eb1cc88b4980f319010 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Fri, 5 Jun 2020 10:36:17 +0200 Subject: [PATCH] nftpinhole.c: fix get_pinhole_info() this whole file should be reviewed carefully fixes #459 --- miniupnpd/netfilter_nft/nftpinhole.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/miniupnpd/netfilter_nft/nftpinhole.c b/miniupnpd/netfilter_nft/nftpinhole.c index c3e2a6e..49fdbb9 100644 --- a/miniupnpd/netfilter_nft/nftpinhole.c +++ b/miniupnpd/netfilter_nft/nftpinhole.c @@ -370,7 +370,8 @@ get_pinhole_info(unsigned short uid, *proto = p->proto; if (timestamp) { - if (sscanf(p->desc, PINEHOLE_LABEL_FORMAT_SKIPDESC,(int *) &uid, &ts) != 2) { + int uid_temp; + if (sscanf(p->desc, PINEHOLE_LABEL_FORMAT_SKIPDESC, &uid_temp, &ts) != 2) { syslog(LOG_DEBUG, "rule with label '%s' is not a IGD pinhole", p->desc); continue; }