From 2ea91c4c5bec0f6e20809d646e41e0ee0a664925 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 18 Jun 2014 20:04:21 +1000 Subject: [PATCH] silence coverity - add nul termination (cherry picked from commit 8eb2d262dc8f542f175d21033a956d8b40a4275f) --- lib/dns/gen.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/dns/gen.c b/lib/dns/gen.c index b9556c698a..ff41de6d62 100644 --- a/lib/dns/gen.c +++ b/lib/dns/gen.c @@ -451,6 +451,7 @@ add(int rdclass, const char *classname, int type, const char *typename, } newcc->rdclass = rdclass; strncpy(newcc->classname, classname, sizeof(newcc->classname)); + newcc->classname[sizeof(newcc->classname) - 1] = '\0'; cc = classes; oldcc = NULL;