From 190dbe1b9111b82b48a05bc0dd8cb0db81bc1370 Mon Sep 17 00:00:00 2001 From: Andrzej Mialkowski Date: Sun, 22 May 2022 23:12:28 -0700 Subject: [PATCH] Fixed allowed offset range during name compression. --- src/rr-dict.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rr-dict.c b/src/rr-dict.c index e3c7f2df..ce5803a3 100644 --- a/src/rr-dict.c +++ b/src/rr-dict.c @@ -1314,7 +1314,7 @@ _getdns_rr_buffer_write_cached_name(gldns_buffer *buf, getdns_bindata *name, nam } } unsigned name_offset = gldns_buffer_position(buf); - if (name_offset < 0xc000) { + if (name_offset < 0x4000) { /* Cache name */ entry_ptr = &name_cache->entry[count % NAME_CACHE_ENTRIES]; entry_ptr->name = name;