From: iceman1001 Date: Tue, 12 Jan 2016 22:40:57 +0000 (+0100) Subject: FIX: Coverity, Unintended sign extension, data[7] would have become int, then uint64_... X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/95d96ea38a0aff0f3cd9a7c24b760f39071043b8 FIX: Coverity, Unintended sign extension, data[7] would have become int, then uint64_t. Should work better now with adding typecasting. --- diff --git a/client/cmdhfmf.c b/client/cmdhfmf.c index 83f26302..267f323c 100644 --- a/client/cmdhfmf.c +++ b/client/cmdhfmf.c @@ -1226,10 +1226,10 @@ int CmdHF14AMf1kSim(const char *Cmd) corr_uid |= (uint64_t)data[2] << 48; corr_uid |= (uint64_t)data[1] << 40; corr_uid |= (uint64_t)data[0] << 32; - corr_uid |= data[7] << 24; - corr_uid |= data[6] << 16; - corr_uid |= data[5] << 8; - corr_uid |= data[4]; + corr_uid |= (uint64_t)data[7] << 24; + corr_uid |= (uint64_t)data[6] << 16; + corr_uid |= (uint64_t)data[5] << 8; + corr_uid |= (uint64_t)data[4]; tryMfk64(corr_uid, data, key); } PrintAndLog("--");