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
I was implementing a CBOR deserialization and I realized that no error was returned by zcbor_check_error when I mistook the type of a CBOR-encoded data item in my decoder function. Then I realized this is due to stop_on_error not being enabled by default in zcbor_new_state.
I don't understand this API choice. Why would I even use zcbor_check_error if I wanted to bypass this check by default?
If there's a reason for that, I would recommend highlighting this in the ZCBOR_STOP_ON_ERROR configuration option documentation at https://github.com/NordicSemiconductor/zcbor as I can see some existing code that apparently doesn't validate the incoming messages properly because of this :).
The text was updated successfully, but these errors were encountered:
Thanks, I see that the README is unclear on this. I think making stop_on_error default to true when ZCBOR_STOP_ON_ERROR is enabled makes a lot of sense.
I was implementing a CBOR deserialization and I realized that no error was returned by
zcbor_check_error
when I mistook the type of a CBOR-encoded data item in my decoder function. Then I realized this is due tostop_on_error
not being enabled by default inzcbor_new_state
.I don't understand this API choice. Why would I even use
zcbor_check_error
if I wanted to bypass this check by default?If there's a reason for that, I would recommend highlighting this in the
ZCBOR_STOP_ON_ERROR
configuration option documentation at https://github.com/NordicSemiconductor/zcbor as I can see some existing code that apparently doesn't validate the incoming messages properly because of this :).The text was updated successfully, but these errors were encountered: