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
{{ message }}
Repository navigation
stsafea_query_mask_id() reads sub_tag uninitialised when the transfer fails #128
When the transfer fails before the response is read (for example STSE_PLATFORM_BUS_ACK_ERROR after every polling retry), sub_tag is never written, so the function reads an uninitialised variable. stse_init() then usually returns STSE_SERVICE_INCOMPATIBLE_DEVICE_TYPE instead of the bus error, and a device that does not answer looks like a device of another type.
The same happens when the device answers with an error status: the payload elements of the response frame are dropped, and sub_tag is not written either.
Suggested fix: return ret first when it is not STSE_OK, then check sub_tag; or initialise sub_tag to a value other than STSAFEA_SUB_TAG_MASK_ID.
Activity