mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 06:55:30 +00:00
4->5
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: rdata.c,v 1.167 2002/03/20 17:12:29 marka Exp $ */
|
/* $Id: rdata.c,v 1.168 2002/03/20 22:06:07 marka Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
@@ -1069,12 +1069,12 @@ dns_rdataclass_fromtext(dns_rdataclass_t *classp, isc_textregion_t *source) {
|
|||||||
|
|
||||||
if (source->length > 5 &&
|
if (source->length > 5 &&
|
||||||
source->length < (5 + sizeof("65000")) &&
|
source->length < (5 + sizeof("65000")) &&
|
||||||
strncasecmp("class", source->base, 4) == 0) {
|
strncasecmp("class", source->base, 5) == 0) {
|
||||||
char buf[sizeof("65000")];
|
char buf[sizeof("65000")];
|
||||||
char *endp;
|
char *endp;
|
||||||
int val;
|
int val;
|
||||||
|
|
||||||
strncpy(buf, source->base + 4, sizeof(buf));
|
strncpy(buf, source->base + 5, sizeof(buf));
|
||||||
buf[sizeof(buf) - 1] = '\0';
|
buf[sizeof(buf) - 1] = '\0';
|
||||||
val = strtol(buf, &endp, 10);
|
val = strtol(buf, &endp, 10);
|
||||||
if (*endp == '\0' && val >= 0 && val <= 0xffff) {
|
if (*endp == '\0' && val >= 0 && val <= 0xffff) {
|
||||||
|
Reference in New Issue
Block a user