Skip to content

Commit

Permalink
[discovery-proxy] Remove assert checks on query name parse errors
Browse files Browse the repository at this point in the history
Remove the `assert` checks on query name parse errors and instead skip
over such entries. Query names are external input (received as DNS
query message from other devices) and discovery proxy code should not
assume that external input will follow the proper query name format.
  • Loading branch information
abtink committed Feb 29, 2024
1 parent 2279c02 commit 8febe51
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/sdp_proxy/discovery_proxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,9 @@ void DiscoveryProxy::OnServiceDiscovered(const std::string
{
case OT_DNSSD_QUERY_TYPE_BROWSE:
splitError = SplitFullServiceName(queryName, serviceName, domain);
assert(splitError == OTBR_ERROR_NONE);
break;
case OT_DNSSD_QUERY_TYPE_RESOLVE:
splitError = SplitFullServiceInstanceName(queryName, instanceName, serviceName, domain);
assert(splitError == OTBR_ERROR_NONE);
break;
default:
splitError = OTBR_ERROR_NOT_FOUND;
Expand Down

0 comments on commit 8febe51

Please sign in to comment.