From 12e942febca7b0a4801762ac58a2b145e889952d Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 14 May 2020 09:59:06 +0200 Subject: [PATCH] coverity - remove bad shift, (untested) --- armsrc/hitagS.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/armsrc/hitagS.c b/armsrc/hitagS.c index 2f07a3468..ce3667e34 100644 --- a/armsrc/hitagS.c +++ b/armsrc/hitagS.c @@ -446,7 +446,7 @@ static void hitagS_handle_reader_command(uint8_t *rx, const size_t rxlen, _hitag2_byte(&state); //send con2, pwdh0, pwdl0, pwdl1 encrypted as a response - tx[0] = _hitag2_byte(&state) ^ ((tag.pages[0][1] >> 16) & 0xff); + tx[0] = _hitag2_byte(&state) ^ tag.pages[0][1]; tx[1] = _hitag2_byte(&state) ^ tag.pwdh0; tx[2] = _hitag2_byte(&state) ^ tag.pwdl0; tx[3] = _hitag2_byte(&state) ^ tag.pwdl1; @@ -454,7 +454,7 @@ static void hitagS_handle_reader_command(uint8_t *rx, const size_t rxlen, //add crc8 *txlen = 40; crc = CRC_PRESET; - calc_crc(&crc, ((tag.pages[0][1] >> 16) & 0xff), 8); + calc_crc(&crc, tag.pages[0][1], 8); calc_crc(&crc, tag.pwdh0, 8); calc_crc(&crc, tag.pwdl0, 8); calc_crc(&crc, tag.pwdl1, 8);