Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
BIND
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
603
Issues
603
List
Boards
Labels
Service Desk
Milestones
Merge Requests
114
Merge Requests
114
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
BIND
Commits
1aba9fe6
Commit
1aba9fe6
authored
Jan 17, 2008
by
Evan Hunt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix coverity warnings in acl.c and iptable.c [rt17455]
parent
c6d486af
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
11 deletions
+26
-11
CHANGES
CHANGES
+3
-0
lib/dns/acl.c
lib/dns/acl.c
+8
-2
lib/dns/iptable.c
lib/dns/iptable.c
+2
-1
lib/isc/include/isc/radix.h
lib/isc/include/isc/radix.h
+13
-8
No files found.
CHANGES
View file @
1aba9fe6
2309. [cleanup] Fix Coverity warnings in lib/dns/acl.c and iptable.c.
[RT #17455]
2308. [cleanup] Silence Coverity warning in bin/named/controlconf.c.
[RT #17495]
...
...
lib/dns/acl.c
View file @
1aba9fe6
...
...
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: acl.c,v 1.3
7 2007/12/21 06:46:47 marka
Exp $ */
/* $Id: acl.c,v 1.3
8 2008/01/17 08:08:08 each
Exp $ */
/*! \file */
...
...
@@ -102,7 +102,13 @@ dns_acl_anyornone(isc_mem_t *mctx, isc_boolean_t neg, dns_acl_t **target) {
result
=
dns_acl_create
(
mctx
,
0
,
&
acl
);
if
(
result
!=
ISC_R_SUCCESS
)
return
(
result
);
dns_iptable_addprefix
(
acl
->
iptable
,
NULL
,
0
,
ISC_TF
(
!
neg
));
result
=
dns_iptable_addprefix
(
acl
->
iptable
,
NULL
,
0
,
ISC_TF
(
!
neg
));
if
(
result
!=
ISC_R_SUCCESS
)
{
dns_acl_detach
(
&
acl
);
return
(
result
);
}
*
target
=
acl
;
return
(
result
);
}
...
...
lib/dns/iptable.c
View file @
1aba9fe6
...
...
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: iptable.c,v 1.
5 2007/09/28 00:11:32
each Exp $ */
/* $Id: iptable.c,v 1.
6 2008/01/17 08:08:08
each Exp $ */
#include <isc/mem.h>
#include <isc/radix.h>
...
...
@@ -66,6 +66,7 @@ dns_iptable_addprefix(dns_iptable_t *tab, isc_netaddr_t *addr,
INSIST
(
DNS_IPTABLE_VALID
(
tab
));
INSIST
(
tab
->
radix
);
INSIST
(
bitlen
<=
32
||
(
addr
->
family
==
AF_INET6
&&
bitlen
<=
128
));
NETADDR_TO_PREFIX_T
(
addr
,
pfx
,
bitlen
);
...
...
lib/isc/include/isc/radix.h
View file @
1aba9fe6
...
...
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: radix.h,v 1.
5 2007/09/28 00:11:32
each Exp $ */
/* $Id: radix.h,v 1.
6 2008/01/17 08:08:08
each Exp $ */
/*
* This source was adapted from MRT's RCS Ids:
...
...
@@ -36,13 +36,18 @@
#define NETADDR_TO_PREFIX_T(na,pt,bits) \
do { \
memset(&(pt), 0, sizeof(pt)); \
if((bits) && (na) != NULL) { \
memcpy(&(pt).add.sin, &(na)->type.in, ((bits)+7)/8); \
(pt).bitlen = (bits); \
(pt).family = (na)->family; \
} else \
(pt).family = AF_INET; \
memset(&(pt), 0, sizeof(pt)); \
if((bits) && (na) != NULL) { \
(pt).family = (na)->family; \
(pt).bitlen = (bits); \
if ((pt).family == AF_INET6) { \
memcpy(&(pt).add.sin6, &(na)->type.in6, \
((bits)+7)/8); \
} else \
memcpy(&(pt).add.sin, &(na)->type.in, \
((bits)+7)/8); \
} else \
(pt).family = AF_INET; \
isc_refcount_init(&(pt).refcount, 0); \
} while(0)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment