diff options
Diffstat (limited to 'src/expr')
-rw-r--r-- | src/expr/lookup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/expr/lookup.c b/src/expr/lookup.c index 5e0bf75..50282a8 100644 --- a/src/expr/lookup.c +++ b/src/expr/lookup.c @@ -47,8 +47,8 @@ nft_rule_expr_lookup_set(struct nft_rule_expr *e, uint16_t type, lookup->dreg = *((uint32_t *)data); break; case NFT_EXPR_LOOKUP_SET: - memcpy(lookup->set_name, data, IFNAMSIZ); - lookup->set_name[IFNAMSIZ-1] = '\0'; + snprintf(lookup->set_name, sizeof(lookup->set_name), "%s", + (const char *)data); break; default: return -1; |