libxtables: Avoid buffer overrun in xtables_compatible_revision()

The function is exported and accepts arbitrary strings as input. Calling
strcpy() without length checks is not OK.
diff --git a/libxtables/xtables.c b/libxtables/xtables.c
index 895f698..777c2b0 100644
--- a/libxtables/xtables.c
+++ b/libxtables/xtables.c
@@ -856,7 +856,8 @@
 
 	xtables_load_ko(xtables_modprobe_program, true);
 
-	strcpy(rev.name, name);
+	strncpy(rev.name, name, XT_EXTENSION_MAXNAMELEN - 1);
+	rev.name[XT_EXTENSION_MAXNAMELEN - 1] = '\0';
 	rev.revision = revision;
 
 	max_rev = getsockopt(sockfd, afinfo->ipproto, opt, &rev, &s);