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
…20592) (#20625)

Co-authored-by: krypton36 <[email protected]>
  • Loading branch information
woody-apple and krypton36 authored Jul 12, 2022
1 parent 0d9a0ad commit dad96b1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@
}

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

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

0 comments on commit dad96b1

Please sign in to comment.