]> git.ipfire.org Git - thirdparty/ipset.git/commitdiff
Fix patch "Handle false warning from -Wstringop-overflow"
authorJozsef Kadlecsik <kadlec@netfilter.org>
Sun, 20 Dec 2020 14:07:21 +0000 (15:07 +0100)
committerJozsef Kadlecsik <kadlec@netfilter.org>
Sun, 20 Dec 2020 14:07:21 +0000 (15:07 +0100)
Return code of strscpy() was not handled properly.

Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org>
kernel/net/netfilter/ipset/ip_set_core.c

index 7ed933d76c5bbb4af0e07c376024460cfb2b9cf1..63a7955dcc859446f7448d4ae528daabba42135e 100644 (file)
@@ -1360,7 +1360,7 @@ IPSET_CBFN(ip_set_rename, struct net *net, struct sock *ctnl,
 
 out:
        write_unlock_bh(&ip_set_ref_lock);
-       return ret;
+       return ret < 0 ? ret : 0;
 }
 
 /* Swap two sets so that name/index points to the other.