From 3033393ba4a4530506fccf8737e0e43b9ee7ff17 Mon Sep 17 00:00:00 2001 From: Apple Date: Thu, 3 Nov 2011 23:31:40 +0000 Subject: [PATCH] libresolv-46.1.tar.gz --- dns_util.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dns_util.c b/dns_util.c index 614d623..f44a008 100644 --- a/dns_util.c +++ b/dns_util.c @@ -349,6 +349,12 @@ _dns_parse_resource_record_internal(const char *p, char **x, int32_t *remaining) *remaining -= 10; + if (*remaining < rdlen) + { + dns_free_resource_record(r); + return NULL; + } + eor = *x; r->data.A = NULL; @@ -709,12 +715,6 @@ _dns_parse_resource_record_internal(const char *p, char **x, int32_t *remaining) case ns_t_null: default: - if (*remaining < rdlen) - { - dns_free_resource_record(r); - return NULL; - } - *remaining -= rdlen; size = sizeof(dns_raw_resource_record_t); -- 2.45.2