diff --git a/lib/dns/tests/tsig_test.c b/lib/dns/tests/tsig_test.c index 5e0f39bfbd..eaba3d2861 100644 --- a/lib/dns/tests/tsig_test.c +++ b/lib/dns/tests/tsig_test.c @@ -75,7 +75,7 @@ add_tsig(dst_context_t *tsigctx, dns_tsigkey_t *key, isc_buffer_t *target) { isc_stdtime_t now; unsigned char tsigbuf[1024]; unsigned int count; - unsigned int sigsize; + unsigned int sigsize = 0; isc_boolean_t invalidate_ctx = ISC_FALSE; memset(&tsig, 0, sizeof(tsig)); @@ -110,6 +110,7 @@ add_tsig(dst_context_t *tsigctx, dns_tsigkey_t *key, isc_buffer_t *target) { isc_buffer_init(&sigbuf, tsig.signature, sigsize); CHECK(dst_context_sign(tsigctx, &sigbuf)); tsig.siglen = isc_buffer_usedlength(&sigbuf); + ATF_CHECK_EQ(sigsize, tsig.siglen); CHECK(isc_buffer_allocate(mctx, &dynbuf, 512)); CHECK(dns_rdata_fromstruct(&rdata, dns_rdataclass_any,