]> mj.ucw.cz Git - pciutils.git/commitdiff
names-net: Avoid buffer overflow warnings by newer gcc
authorMartin Mares <mj@ucw.cz>
Tue, 21 Jan 2020 20:51:39 +0000 (21:51 +0100)
committerMartin Mares <mj@ucw.cz>
Tue, 21 Jan 2020 20:51:39 +0000 (21:51 +0100)
lib/names-net.c

index 655b4861bc8c81a21ed3f9ee30009dc91999ff6d..95a6fd2654cd26cb378efad050b8fbd225bc1e07 100644 (file)
@@ -196,7 +196,7 @@ char
     default:
       return NULL;
     }
-  sprintf(dnsname, "%s.%s", name, domain);
+  sprintf(dnsname, "%.100s.%.100s", name, domain);
 
   a->debug("Resolving %s\n", dnsname);
   if (!resolver_inited)