]> git.ipfire.org Git - thirdparty/knot-resolver.git/commit
cache: fixed crash with RR sets with over 255 records
authorMarek Vavruša <mvavrusa@cloudflare.com>
Wed, 28 Mar 2018 05:10:09 +0000 (22:10 -0700)
committerMarek Vavruša <mvavrusa@cloudflare.com>
Wed, 28 Mar 2018 07:33:22 +0000 (00:33 -0700)
commita0c2e933f8d80fa9e3cf605a273b975aed7c4ba0
treedd14d008d7935ee63d6e6c584bfe2ac7b86cdede
parenteca3e144b9ac46cb442e8b6e68e1638f93eef57a
cache: fixed crash with RR sets with over 255 records

The previous cache version encoded RR count as uint8_t, which doesn't
work with RR sets with over 255 records. This caused cache writes
to fail and subsequently ending in an assertion failure.
It is not very common to have large RR sets, but it has legitimate
use cases such as a lot of SRV or address records for large container
deployments etc.
lib/cache/api.c
lib/cache/entry_list.c
lib/cache/entry_rr.c
lib/cache/impl.h
lib/cache/nsec1.c