mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-07-16 02:03:00 -07:00
some @iceman1001 s coverty scan fixes
great work!
This commit is contained in:
parent
3975d477e1
commit
c4c3af7c16
7 changed files with 20 additions and 3 deletions
|
@ -497,3 +497,13 @@ void xor(unsigned char *dst, unsigned char *src, size_t len) {
|
|||
int32_t le24toh (uint8_t data[3]) {
|
||||
return (data[2] << 16) | (data[1] << 8) | data[0];
|
||||
}
|
||||
|
||||
// RotateLeft - Ultralight, Desfire, works on byte level
|
||||
// 00-01-02 >> 01-02-00
|
||||
void rol(uint8_t *data, const size_t len){
|
||||
uint8_t first = data[0];
|
||||
for (size_t i = 0; i < len-1; i++) {
|
||||
data[i] = data[i+1];
|
||||
}
|
||||
data[len-1] = first;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue