mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Fix DoS in Quick Share via malformed mDNS on Apple platforms
PiperOrigin-RevId: 949295891
This commit is contained in:
committed by
Copybara-Service
parent
a6f799af7f
commit
953d9ea26c
@@ -63,7 +63,7 @@ bool StartDiscovery(GNCNWFramework* medium, const std::string& service_type,
|
||||
serviceFoundHandler:^(NSString* name, NSDictionary<NSString*, NSString*>* txtRecords) {
|
||||
NsdServiceInfo nsd_service_info;
|
||||
nsd_service_info.SetServiceType([serviceType UTF8String]);
|
||||
nsd_service_info.SetServiceName([name UTF8String]);
|
||||
nsd_service_info.SetServiceName(name ? [name UTF8String] : "");
|
||||
[txtRecords
|
||||
enumerateKeysAndObjectsUsingBlock:[nsd_service_info = &nsd_service_info](
|
||||
NSString* key, NSString* val, BOOL* stop) {
|
||||
@@ -74,7 +74,7 @@ bool StartDiscovery(GNCNWFramework* medium, const std::string& service_type,
|
||||
serviceLostHandler:^(NSString* name, NSDictionary<NSString*, NSString*>* txtRecords) {
|
||||
NsdServiceInfo nsd_service_info;
|
||||
nsd_service_info.SetServiceType([serviceType UTF8String]);
|
||||
nsd_service_info.SetServiceName([name UTF8String]);
|
||||
nsd_service_info.SetServiceName(name ? [name UTF8String] : "");
|
||||
[txtRecords
|
||||
enumerateKeysAndObjectsUsingBlock:[nsd_service_info = &nsd_service_info](
|
||||
NSString* key, NSString* val, BOOL* stop) {
|
||||
|
||||
Reference in New Issue
Block a user