@@ -40,7 +40,7 @@ MODULE_ALIAS("ip_set_hash:net,iface");
40
40
#define IP_SET_HASH_WITH_MULTI
41
41
#define IP_SET_HASH_WITH_NET0
42
42
43
- #define STRLCPY (a , b ) strlcpy (a, b, IFNAMSIZ)
43
+ #define STRSCPY (a , b ) strscpy (a, b, IFNAMSIZ)
44
44
45
45
/* IPv4 variant */
46
46
@@ -182,11 +182,11 @@ hash_netiface4_kadt(struct ip_set *set, const struct sk_buff *skb,
182
182
183
183
if (!eiface )
184
184
return - EINVAL ;
185
- STRLCPY (e .iface , eiface );
185
+ STRSCPY (e .iface , eiface );
186
186
e .physdev = 1 ;
187
187
#endif
188
188
} else {
189
- STRLCPY (e .iface , SRCDIR ? IFACE (in ) : IFACE (out ));
189
+ STRSCPY (e .iface , SRCDIR ? IFACE (in ) : IFACE (out ));
190
190
}
191
191
192
192
if (strlen (e .iface ) == 0 )
@@ -400,11 +400,11 @@ hash_netiface6_kadt(struct ip_set *set, const struct sk_buff *skb,
400
400
401
401
if (!eiface )
402
402
return - EINVAL ;
403
- STRLCPY (e .iface , eiface );
403
+ STRSCPY (e .iface , eiface );
404
404
e .physdev = 1 ;
405
405
#endif
406
406
} else {
407
- STRLCPY (e .iface , SRCDIR ? IFACE (in ) : IFACE (out ));
407
+ STRSCPY (e .iface , SRCDIR ? IFACE (in ) : IFACE (out ));
408
408
}
409
409
410
410
if (strlen (e .iface ) == 0 )
0 commit comments