EIP712 STRUCT FIELD DEF now checks the APDU payload bounds

This commit is contained in:
Alexandre Paillier
2022-07-13 18:33:29 +02:00
parent 0cc75edf69
commit b4fe42cd78
3 changed files with 142 additions and 40 deletions

View File

@@ -61,7 +61,7 @@ bool handle_eip712_struct_def(const uint8_t *const apdu_buf)
ret = set_struct_name(apdu_buf[OFFSET_LC], &apdu_buf[OFFSET_CDATA]);
break;
case P2_FIELD:
ret = set_struct_field(apdu_buf);
ret = set_struct_field(apdu_buf[OFFSET_LC], &apdu_buf[OFFSET_CDATA]);
break;
default:
PRINTF("Unknown P2 0x%x for APDU 0x%x\n",