mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-26 00:30:05 -04:00
Fix several errors reported by Coverity. [RT #17160]
This commit is contained in:
parent
47e37d8ebd
commit
b6d7e10f58
5 changed files with 11 additions and 7 deletions
2
CHANGES
2
CHANGES
|
|
@ -8,6 +8,8 @@
|
|||
2249. [bug] Only set Authentic Data bit if client requested
|
||||
DNSSEC, per RFC 3655 [RT #17175]
|
||||
|
||||
2248. [cleanup] Fix several errors reported by Coverity. [RT #17160]
|
||||
|
||||
2245. [bug] Validating lack of DS records at trust anchors wasn't
|
||||
working. [RT #17151]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LINT
|
||||
static const char rcsid[] = "$Header: /u0/home/explorer/proj/ISC/git-conversion/cvsroot/bind9/lib/bind/dst/Attic/dst_api.c,v 1.10.332.6 2007/08/27 03:34:24 marka Exp $";
|
||||
static const char rcsid[] = "$Header: /u0/home/explorer/proj/ISC/git-conversion/cvsroot/bind9/lib/bind/dst/Attic/dst_api.c,v 1.10.332.7 2007/09/26 04:41:47 each Exp $";
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
@ -434,6 +434,7 @@ dst_s_write_private_key(const DST_KEY *key)
|
|||
if ((nn = fwrite(encoded_block, 1, len, fp)) != len) {
|
||||
EREPORT(("dst_write_private_key(): Write failure on %s %d != %d errno=%d\n",
|
||||
file, len, nn, errno));
|
||||
fclose(fp);
|
||||
return (-5);
|
||||
}
|
||||
fclose(fp);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#ifdef HMAC_MD5
|
||||
#ifndef LINT
|
||||
static const char rcsid[] = "$Header: /u0/home/explorer/proj/ISC/git-conversion/cvsroot/bind9/lib/bind/dst/Attic/hmac_link.c,v 1.3.164.4 2007/02/26 02:00:24 marka Exp $";
|
||||
static const char rcsid[] = "$Header: /u0/home/explorer/proj/ISC/git-conversion/cvsroot/bind9/lib/bind/dst/Attic/hmac_link.c,v 1.3.164.5 2007/09/26 04:41:47 each Exp $";
|
||||
#endif
|
||||
/*
|
||||
* Portions Copyright (c) 1995-1998 by Trusted Information Systems, Inc.
|
||||
|
|
@ -223,6 +223,7 @@ dst_buffer_to_hmac_md5(DST_KEY *dkey, const u_char *key, const int keylen)
|
|||
HMAC_Key *hkey = NULL;
|
||||
MD5_CTX ctx;
|
||||
int local_keylen = keylen;
|
||||
u_char tk[MD5_LEN];
|
||||
|
||||
if (dkey == NULL || key == NULL || keylen < 0)
|
||||
return (-1);
|
||||
|
|
@ -235,7 +236,6 @@ dst_buffer_to_hmac_md5(DST_KEY *dkey, const u_char *key, const int keylen)
|
|||
|
||||
/* if key is longer than HMAC_LEN bytes reset it to key=MD5(key) */
|
||||
if (keylen > HMAC_LEN) {
|
||||
u_char tk[MD5_LEN];
|
||||
MD5Init(&ctx);
|
||||
MD5Update(&ctx, key, keylen);
|
||||
MD5Final(tk, &ctx);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* $Id: tsig.c,v 1.117.18.9 2006/05/02 04:23:12 marka Exp $
|
||||
* $Id: tsig.c,v 1.117.18.10 2007/09/26 04:41:47 each Exp $
|
||||
*/
|
||||
/*! \file */
|
||||
#include <config.h>
|
||||
|
|
@ -1429,8 +1429,10 @@ dns_tsigkeyring_create(isc_mem_t *mctx, dns_tsig_keyring_t **ringp) {
|
|||
return (ISC_R_NOMEMORY);
|
||||
|
||||
result = isc_rwlock_init(&ring->lock, 0, 0);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_mem_put(mctx, ring, sizeof(dns_tsig_keyring_t));
|
||||
return (result);
|
||||
}
|
||||
|
||||
ring->keys = NULL;
|
||||
result = dns_rbt_create(mctx, free_tsignode, NULL, &ring->keys);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: lwres_gnba.c,v 1.23.18.2 2005/04/29 00:17:20 marka Exp $ */
|
||||
/* $Id: lwres_gnba.c,v 1.23.18.3 2007/09/26 04:41:47 each Exp $ */
|
||||
|
||||
/*! \file lwres_gnba.c
|
||||
These are low-level routines for creating and parsing lightweight
|
||||
|
|
@ -126,7 +126,6 @@ lwres_gnbarequest_render(lwres_context_t *ctx, lwres_gnbarequest_t *req,
|
|||
REQUIRE(req != NULL);
|
||||
REQUIRE(req->addr.family != 0);
|
||||
REQUIRE(req->addr.length != 0);
|
||||
REQUIRE(req->addr.address != NULL);
|
||||
REQUIRE(pkt != NULL);
|
||||
REQUIRE(b != NULL);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue