• T
    [NETLINK]: Improve string attribute validation · a5531a5d
    Thomas Graf 提交于
    Introduces a new attribute type NLA_NUL_STRING to support NUL
    terminated strings. Attributes of this kind require to carry
    a terminating NUL within the maximum specified in the policy.
    
    The `old' NLA_STRING which is not required to be NUL terminated
    is extended to provide means to specify a maximum length of the
    string.
    
    Aims at easing the pain with using nla_strlcpy() on temporary
    buffers.
    Signed-off-by: NThomas Graf <tgraf@suug.ch>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    a5531a5d
attr.c 10.4 KB