Skip to content

Commit

Permalink
Resolve crasher in Matter.framework when parsing query image params
Browse files Browse the repository at this point in the history
  • Loading branch information
krypton36 committed Jul 12, 2022
1 parent 0b37782 commit c89e5c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@
}

if (commandData.location.HasValue()) {
commandParams.location = [NSString stringWithUTF8String:commandData.location.Value().data()];
NSData * locationData = [NSData dataWithBytes:commandData.location.Value().data() length:commandData.location.Value().size()];
commandParams.location = [[NSString alloc] initWithData:locationData encoding:NSUTF8StringEncoding];
}

if (commandData.requestorCanConsent.HasValue()) {
Expand Down

0 comments on commit c89e5c6

Please sign in to comment.