You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using an example fabric id: d5f9b903418fda11, I am unable to set the fabric id on the controller params since it only accepts a "signed" Long as a parameter. This fabric id can be parsed as an unsigned Long but when converting to a Long it becomes a negative value and fails the sdk check:
public Builder setFabricId(long fabricId) {
if (fabricId < 1L) {
throw new IllegalArgumentException("fabricId must be > 0");
} else {
this.fabricId = fabricId;
return this;
}
}
Repro steps:
Try to set a valid fabric id with a value greater than 7FFF_FFFF_FFFF_FFFF on the controller parameters.
maurycyw
changed the title
[BUG] Android matter sdk setFabricId only accepts a Long.
[BUG] Android matter sdk setFabricId does not accept values which touch twos compliment
Aug 15, 2023
I think we should consider to use BigInteger
I think this issue happens in several place with uint64_t in android controller.
both EventNumber and FabricId needs to be fixed since they are defined with
uint64_t EventNumber;
uint64_t FabricId;
Reproduction steps
Using an example fabric id:
d5f9b903418fda11
, I am unable to set the fabric id on the controller params since it only accepts a "signed" Long as a parameter. This fabric id can be parsed as an unsigned Long but when converting to a Long it becomes a negative value and fails the sdk check:Repro steps:
7FFF_FFFF_FFFF_FFFF
on the controller parameters.Bug prevalence
everytime
GitHub hash of the SDK that was being used
8f66f42
Platform
android
Platform Version(s)
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: