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
The string length for various response structs may be too short in some cases. The heapless Strings will fail to deserialize if they don't fit into the reserved space. Recently this caused the card.location request to fail, because the location as returned by blues was too long for the length. Even though the location field was not used, and only the GPS coordinates were used. This was triggered when the device was located somewhere with a long name. The fix here was just to make the field much longer:
But it is still not very robust. And there might be other places where this is a problem. The best would be if there could be some serde directive to make heapless truncate the string, rather than error: rust-embedded/heapless#379 . Alternatively using an allocator might also make things more robust, but maybe unpredictable and vulnerable to bogus long strings from the notecard.
The text was updated successfully, but these errors were encountered:
The string length for various response structs may be too short in some cases. The heapless Strings will fail to deserialize if they don't fit into the reserved space. Recently this caused the
card.location
request to fail, because the location as returned by blues was too long for the length. Even though the location field was not used, and only the GPS coordinates were used. This was triggered when the device was located somewhere with a long name. The fix here was just to make the field much longer:But it is still not very robust. And there might be other places where this is a problem. The best would be if there could be some serde directive to make heapless truncate the string, rather than error: rust-embedded/heapless#379 . Alternatively using an allocator might also make things more robust, but maybe unpredictable and vulnerable to bogus long strings from the notecard.
The text was updated successfully, but these errors were encountered: