mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
cppcheck ctunullpointerOutOfMemory
This commit is contained in:
parent
dfdb8f54cc
commit
d5ecc626ab
1 changed files with 3 additions and 0 deletions
|
@ -58,6 +58,9 @@ static int CmdHelp(const char *Cmd);
|
||||||
|
|
||||||
static int getFDXBBits(uint64_t national_code, uint16_t country_code, uint8_t is_animal, uint8_t is_extended, uint32_t extended, uint8_t *bits) {
|
static int getFDXBBits(uint64_t national_code, uint16_t country_code, uint8_t is_animal, uint8_t is_extended, uint32_t extended, uint8_t *bits) {
|
||||||
|
|
||||||
|
if (bits == NULL) {
|
||||||
|
return PM3_ESOFT;
|
||||||
|
}
|
||||||
// add preamble ten 0x00 and one 0x01
|
// add preamble ten 0x00 and one 0x01
|
||||||
memset(bits, 0x00, 10);
|
memset(bits, 0x00, 10);
|
||||||
bits[10] = 1;
|
bits[10] = 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue