diff options
author | Yuri Wiitala <miu@chromium.org> | 2020-11-24 04:33:44 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-11-24 13:03:38 +0000 |
commit | 784170929fae06482dd9603d62697d57d5bde382 (patch) | |
tree | 2c26cee2698d434ad2c4d5cde7bc88cd5e79c94e /cast/sender | |
parent | b5ac6d34a14cc938258a938ebe3604a93776f7fa (diff) | |
download | openscreen-784170929fae06482dd9603d62697d57d5bde382.tar.gz |
Bring openscreen::cast::ServiceInfo parsing/validation up-to-spec.
1. More-thorough validation-before-serialization
(ServiceInfo::IsValid()), ensuring required fields are set, within valid
ranges, and will fit within the TXT record field maximum size.
2. Make "model name" an optional field (was being treated as required).
3. Range-checks of untrusted input in
DnsSdInstanceEndpointToServiceInfo().
4. Rename kXYZId[] char constants to kXYZKey[], since they are key names
in the record, not identifiers.
5. Removed DnsSdTxtRecord::SetValue() overload for uint8_t values, since
it was being erroneously used to set values that were supposed to be
decimal-formatted number strings (i.e., not a raw byte value!).
6. Add a regression test, to ensure a real-world TXT record from a
Chromecast Ultra is successfully converted into a ServiceInfo.
Bug: b/162542369
Change-Id: I06633c6c54dd2f6e6367033381b100949b08be8b
Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2552423
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Ryan Keane <rwkeane@google.com>
Diffstat (limited to 'cast/sender')
0 files changed, 0 insertions, 0 deletions