Commit 86548554 authored by Mark Andrews's avatar Mark Andrews
Browse files

1618. [bug] Fencepost errors in dns_name_ishostname() and

                        dns_name_ismailbox() could trigger a INSIST().
parent 90039392
1618. [bug] Fencepost errors in dns_name_ishostname() and
dns_name_ismailbox() could trigger a INSIST().
1617. [port] win32: VC++ 6.0 support. 1617. [port] win32: VC++ 6.0 support.
1616. [placeholder] rt11127 1616. [placeholder] rt11127
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: name.c,v 1.144 2004/03/05 05:09:21 marka Exp $ */ /* $Id: name.c,v 1.145 2004/04/19 21:47:43 marka Exp $ */
#include <config.h> #include <config.h>
...@@ -285,7 +285,7 @@ dns_name_ismailbox(const dns_name_t *name) { ...@@ -285,7 +285,7 @@ dns_name_ismailbox(const dns_name_t *name) {
ndata = name->ndata; ndata = name->ndata;
n = *ndata++; n = *ndata++;
INSIST(n < 63); INSIST(n <= 63);
while (n--) { while (n--) {
ch = *ndata++; ch = *ndata++;
if (!domainchar(ch)) if (!domainchar(ch))
...@@ -300,7 +300,7 @@ dns_name_ismailbox(const dns_name_t *name) { ...@@ -300,7 +300,7 @@ dns_name_ismailbox(const dns_name_t *name) {
*/ */
while (ndata < (name->ndata + name->length)) { while (ndata < (name->ndata + name->length)) {
n = *ndata++; n = *ndata++;
INSIST(n < 63); INSIST(n <= 63);
first = ISC_TRUE; first = ISC_TRUE;
while (n--) { while (n--) {
ch = *ndata++; ch = *ndata++;
...@@ -345,7 +345,7 @@ dns_name_ishostname(const dns_name_t *name, isc_boolean_t wildcard) { ...@@ -345,7 +345,7 @@ dns_name_ishostname(const dns_name_t *name, isc_boolean_t wildcard) {
*/ */
while (ndata < (name->ndata + name->length)) { while (ndata < (name->ndata + name->length)) {
n = *ndata++; n = *ndata++;
INSIST(n < 63); INSIST(n <= 63);
first = ISC_TRUE; first = ISC_TRUE;
while (n--) { while (n--) {
ch = *ndata++; ch = *ndata++;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment