Fix otp write length check.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -270,7 +270,7 @@ int cmd_extras() {
|
||||
else {
|
||||
apdu.nc -= 2;
|
||||
apdu.data += 2;
|
||||
if (!(apdu.nc % 2)) {
|
||||
if (apdu.nc % 2) {
|
||||
return SW_WRONG_DATA();
|
||||
}
|
||||
int ret = otp_write_data(row, apdu.data, apdu.nc);
|
||||
|
||||
Reference in New Issue
Block a user