From be48e0b7518fa3891dad6304555e79b70952eaee Mon Sep 17 00:00:00 2001 From: Federico Cerutti Date: Thu, 8 Nov 2018 01:11:34 +0100 Subject: [PATCH] Checked with a real tag and the error is correct. Also fixed a small error which let the tag still go out of bound. --- Firmware/Chameleon-Mini/Application/TITagitstandard.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Firmware/Chameleon-Mini/Application/TITagitstandard.c b/Firmware/Chameleon-Mini/Application/TITagitstandard.c index f60839f..31bb710 100644 --- a/Firmware/Chameleon-Mini/Application/TITagitstandard.c +++ b/Firmware/Chameleon-Mini/Application/TITagitstandard.c @@ -98,9 +98,9 @@ uint16_t TITagitstandardAppProcess(uint8_t* FrameBuf, uint16_t FrameBytes) else PageAddress = FrameBuf[2]; - if (PageAddress > NUMBER_OF_SECTORS) { /* the reader is requesting a sector out of bound */ + if (PageAddress >= NUMBER_OF_SECTORS) { /* the reader is requesting a sector out of bound */ FrameBuf[0] = ISO15693_RES_FLAG_ERROR; - FrameBuf[1] = ISO15693_RES_ERR_BLK_NOT_AVL; // Is this enough? + FrameBuf[1] = ISO15693_RES_ERR_BLK_NOT_AVL; /* real TiTag standard reply with this error */ ResponseByteCount = 2; break; }