diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-07-23 04:04:19 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-07-23 04:50:19 +0200 |
commit | f5430a3ef308f3a102899fcaf7fbece757082f2a (patch) | |
tree | ca31992b7c4fff12ebcf2ec4f254a2b964b0ccd6 /src/basic/blkid-util.h | |
parent | 6aafa9483d167f55a50e01f4dc5984866f12c8ec (diff) |
resolve: unify memdup() code when parsing RRs
Let's make dns_packet_read_public_key() more generic by renaming it to
dns_packet_read_memdup() (which more accurately describes what it
does...). Then, patch all cases where we memdup() RR data to use this
new call.
This specifically checks for zero-length objects, and handles them
gracefully. It will set zero length payload fields as a result.
Special care should be taken to ensure that any code using this call
can handle the returned allocated field to be NULL if the size is
specified as 0!
Diffstat (limited to 'src/basic/blkid-util.h')
0 files changed, 0 insertions, 0 deletions