Skip to content

Conversation

@nkljajic
Copy link
Collaborator

If ConfigurationParameters::Info has characters > 0x7F like Degree sign 0xb0, or cent sign 0xa2,

ZPC will crash

Example device is Zooz 4-in-1 sensor

terminate called after throwing an instance of 'nlohmann::detail::type_error'
what(): [json.exception.type_error.316] invalid UTF-8 byte at index 17: 0xA2
Aborted

catch exception, replace character and contiue:

[dotdot_mqtt] by-unid ConfigurationParameters::Info: Unable to parse JSON payload: [json.exception.type_error.316] invalid UTF-8 byte at index 17: 0xA2
[dotdot_mqtt] by-unid ConfigurationParameters::Info: Unable to parse JSON payload: [json.exception.type_error.316] invalid UTF-8 byte at index 17: 0xA2

…gn 0xb0, or cent sign 0xa2,

ZPC will crash

Example device is Zooz 4-in-1 sensor

terminate called after throwing an instance of 'nlohmann::detail::type_error'
  what():  [json.exception.type_error.316] invalid UTF-8 byte at index 17: 0xA2
Aborted

catch exception, replace character and contiue:

[dotdot_mqtt] by-unid ConfigurationParameters::Info: Unable to parse JSON payload: [json.exception.type_error.316] invalid UTF-8 byte at index 17: 0xA2
[dotdot_mqtt] by-unid ConfigurationParameters::Info: Unable to parse JSON payload: [json.exception.type_error.316] invalid UTF-8 byte at index 17: 0xA2
@jsloth
Copy link
Collaborator

jsloth commented Aug 24, 2022

Thanks for the PR, we will look at it for the upcoming release

@nkljajic nkljajic closed this Mar 21, 2023
@nkljajic nkljajic deleted the 1.2.0-bugfix branch March 27, 2023 07:53
@rzr
Copy link
Collaborator

rzr commented Nov 22, 2023

Hi may I suggest to rebase your changes and open new PRs for community contributions:

#15

@nkljajic
Copy link
Collaborator Author

This fix is part of Unify 1.2.1 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants