Replace all occurrences of `strcpy' with `sstrncpy'.
[collectd.git] / src / utils_dns.c
index 25ef189..3f5d4fb 100644 (file)
@@ -384,7 +384,7 @@ handle_dns(const char *buf, int len,
     if (0 != x)
        return 0;
     if ('\0' == qh.qname[0])
-       strcpy(qh.qname, ".");
+       strncpy (qh.qname, ".", sizeof (qh.qname));
     while ((t = strchr(qh.qname, '\n')))
        *t = ' ';
     while ((t = strchr(qh.qname, '\r')))