]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/resolve/resolved-dns-packet.c
resolved: packet - fail on invalid zero-length data
authorTom Gundersen <teg@jklm.no>
Thu, 23 Jul 2015 10:57:58 +0000 (12:57 +0200)
committerTom Gundersen <teg@jklm.no>
Thu, 23 Jul 2015 16:01:17 +0000 (18:01 +0200)
commitf1d178cce1ada81346fb864c8f95aa2163b37a56
tree3e7de30afaac0da775323b57994145b56847eda9
parent20330324e3dd95e1a5951d154cbf2b9f8627d818
resolved: packet - fail on invalid zero-length data

Most blobs (keys, signatures, ...) should have a specific size given by
the relevant algorithm. However, as we don't use/verify the algorithms
yet, let's just ensure that we don't read out zero-length data in cases
where this does not make sense.

The only exceptions, where zero-length data is allowed are in the NSEC3
salt field, and the generic data (which we don't know anything about,
so  better not make any assumptions).
src/resolve/resolved-dns-packet.c