From: Mark Andrews Date: Wed, 18 Jun 2014 10:04:21 +0000 (+1000) Subject: silence coverity - add nul termination X-Git-Tag: v9.10.1b1~10 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=1d9fdb0dd6821fc740615c850cf633b2f022595e;p=thirdparty%2Fbind9.git silence coverity - add nul termination (cherry picked from commit 8eb2d262dc8f542f175d21033a956d8b40a4275f) --- diff --git a/lib/dns/gen.c b/lib/dns/gen.c index b9556c698a1..ff41de6d624 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;