@@ -1021,7 +1021,7 @@ static int cmd_put_data() {
1021
1021
if (!tf ) {
1022
1022
return SW_REFERENCE_NOT_FOUND ();
1023
1023
}
1024
- uint8_t def [IV_SIZE + 32 + 32 + 32 ];
1024
+ uint8_t def [IV_SIZE + 32 + 32 + 32 + 32 ];
1025
1025
memcpy (def , file_get_data (tf ), file_get_size (tf ));
1026
1026
hash_multi (apdu .data , apdu .nc , session_rc );
1027
1027
memcpy (def + IV_SIZE + 32 , dek + IV_SIZE , 32 );
@@ -1066,7 +1066,7 @@ static int cmd_change_pin() {
1066
1066
if (!tf ) {
1067
1067
return SW_REFERENCE_NOT_FOUND ();
1068
1068
}
1069
- uint8_t def [IV_SIZE + 32 + 32 + 32 ];
1069
+ uint8_t def [IV_SIZE + 32 + 32 + 32 + 32 ];
1070
1070
memcpy (def , file_get_data (tf ), file_get_size (tf ));
1071
1071
if (P2 (apdu ) == 0x81 ) {
1072
1072
hash_multi (apdu .data + pin_len , apdu .nc - pin_len , session_pw1 );
@@ -1125,7 +1125,7 @@ static int cmd_reset_retry() {
1125
1125
if (!tf ) {
1126
1126
return SW_REFERENCE_NOT_FOUND ();
1127
1127
}
1128
- uint8_t def [IV_SIZE + 32 + 32 + 32 ];
1128
+ uint8_t def [IV_SIZE + 32 + 32 + 32 + 32 ];
1129
1129
memcpy (def , file_get_data (tf ), file_get_size (tf ));
1130
1130
hash_multi (apdu .data + (apdu .nc - newpin_len ), newpin_len , session_pw1 );
1131
1131
memcpy (def + IV_SIZE , dek + IV_SIZE , 32 );
0 commit comments