diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-02-21 10:49:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-21 10:49:49 +0100 |
commit | 1ebfd03bd9d3fb8ccb5d17fd741b04914479df28 (patch) | |
tree | 4246d7b450bcc1a947fd8c206f2bc61d2f7ed79b /src/shared/firewall-util.c | |
parent | cc7de2ba32562311288480e3a8faba0298852299 (diff) | |
parent | 2fa4861ad5a203bff604cac660136834e3b70108 (diff) |
Merge pull request #5390 from keszybz/coverity
Clarifications to make coverity happy
Diffstat (limited to 'src/shared/firewall-util.c')
-rw-r--r-- | src/shared/firewall-util.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/shared/firewall-util.c b/src/shared/firewall-util.c index 9c29b0afca..952fc48c45 100644 --- a/src/shared/firewall-util.c +++ b/src/shared/firewall-util.c @@ -76,8 +76,11 @@ static int entry_fill_basics( } if (out_interface) { + size_t l = strlen(out_interface); + assert(l < sizeof entry->ip.outiface && l < sizeof entry->ip.outiface_mask); + strcpy(entry->ip.outiface, out_interface); - memset(entry->ip.outiface_mask, 0xFF, strlen(out_interface)+1); + memset(entry->ip.outiface_mask, 0xFF, l + 1); } if (destination) { entry->ip.dst = destination->in; |