Security review code linting
This commit is contained in:
@@ -16,7 +16,7 @@ extern s_eip712_context *eip712_context;
|
||||
bool eip712_context_init(void);
|
||||
void eip712_context_deinit(void);
|
||||
|
||||
typedef enum {NOT_INITIALIZED, INITIALIZED} e_struct_init;
|
||||
typedef enum { NOT_INITIALIZED, INITIALIZED } e_struct_init;
|
||||
extern e_struct_init struct_state;
|
||||
|
||||
#endif // HAVE_EIP712_FULL_SUPPORT
|
||||
|
||||
@@ -76,7 +76,7 @@ void *encode_int(const uint8_t *const value, uint8_t length, uint8_t typesize) {
|
||||
|
||||
if (length < 1) {
|
||||
apdu_response_code = APDU_RESPONSE_INVALID_DATA;
|
||||
return NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if ((length == typesize) && (value[0] & (1 << 7))) // negative number
|
||||
|
||||
@@ -703,7 +703,6 @@ bool set_struct_field(uint8_t length, const uint8_t *const data) {
|
||||
|
||||
// check TypeSize flag in TypeDesc
|
||||
if (*typedesc_ptr & TYPESIZE_MASK) {
|
||||
|
||||
// TYPESIZE and TYPE_CUSTOM are mutually exclusive
|
||||
if ((*typedesc_ptr & TYPE_MASK) == TYPE_CUSTOM) {
|
||||
apdu_response_code = APDU_RESPONSE_CONDITION_NOT_SATISFIED;
|
||||
|
||||
Reference in New Issue
Block a user