2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

make dns_name_fromtext fail when passed an empty string, not assert.

This commit is contained in:
Brian Wellington
2001-01-22 03:30:27 +00:00
parent e8af4e1524
commit 9427d22299
2 changed files with 4 additions and 5 deletions

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: name.h,v 1.87 2001/01/09 21:53:04 bwelling Exp $ */
/* $Id: name.h,v 1.88 2001/01/22 03:30:27 bwelling Exp $ */
#ifndef DNS_NAME_H
#define DNS_NAME_H 1
@@ -830,8 +830,8 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
*
* 'name' is a valid name.
*
* 'source' is a valid buffer with a current pointer before its
* used pointer.
* 'source' is a valid buffer with a current pointer before or at the
* same place as its used pointer.
*
* 'target' is a valid buffer or 'target' is NULL and 'name' has
* a dedicated buffer.

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: name.c,v 1.117 2001/01/11 21:07:20 gson Exp $ */
/* $Id: name.c,v 1.118 2001/01/22 03:30:26 bwelling Exp $ */
#include <config.h>
@@ -1111,7 +1111,6 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
REQUIRE(VALID_NAME(name));
REQUIRE(ISC_BUFFER_VALID(source));
REQUIRE(isc_buffer_current(source) < isc_buffer_used(source));
REQUIRE((target != NULL && ISC_BUFFER_VALID(target)) ||
(target == NULL && name->buffer != NULL));