mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-19 11:33:51 +08:00
FIX: Coverity, unintended sign extention, CID #121363, (numbits << 16) becomes int, then uint64_t. But the signness might set all upper bits to 1 in the process.
This commit is contained in:
parent
28415b5d90
commit
4c685ac887
1 changed files with 1 additions and 1 deletions
|
@ -735,7 +735,7 @@ int CmdHF14ACmdRaw(const char *cmd) {
|
|||
// Max buffer is USB_CMD_DATA_SIZE
|
||||
datalen = (datalen > USB_CMD_DATA_SIZE) ? USB_CMD_DATA_SIZE : datalen;
|
||||
|
||||
c.arg[1] = (datalen & 0xFFFF) | (numbits << 16);
|
||||
c.arg[1] = (datalen & 0xFFFF) | (uint32_t)(numbits << 16);
|
||||
memcpy(c.d.asBytes,data,datalen);
|
||||
|
||||
clearCommandBuffer();
|
||||
|
|
Loading…
Add table
Reference in a new issue