Skip to content
Commit 027a19a5 authored by Robert Lubos's avatar Robert Lubos Committed by Anas Nashif
Browse files

net: lib: dns_sd: Fix buffer sizes on query processing



A few issues were identified with DNS_SD segment buffers, making it work
"by chance" (depending on memory layout):

- size check in dns_sd_query_extract() did not take NULL termination
  into account, and in result could overflow provided buffer
- the proto_buf in send_sd_response() can either be used to parse
  protocol or domain, depending on number of segments in the query.
  It should therefore be large enough to hold either.
- Similarily, instance_buf should be able to hold
  DNS_SD_INSTANCE_MAX_SIZE, not DNS_SD_SERVICE_MAX_SIZE.

Signed-off-by: default avatarRobert Lubos <robert.lubos@nordicsemi.no>
parent 63a5d268
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment