nftpinhole.c: fix get_pinhole_info()

this whole file should be reviewed carefully

fixes #459
This commit is contained in:
Thomas Bernard 2020-06-05 10:36:17 +02:00
parent 3716381308
commit 409ba9c0f2
No known key found for this signature in database
GPG Key ID: 0FF11B67A5C0863C
1 changed files with 2 additions and 1 deletions

View File

@ -370,7 +370,8 @@ get_pinhole_info(unsigned short uid,
*proto = p->proto; *proto = p->proto;
if (timestamp) { 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); syslog(LOG_DEBUG, "rule with label '%s' is not a IGD pinhole", p->desc);
continue; continue;
} }