cppcheck nullPointerOutOfMemory
This commit is contained in:
1 parent
e42932738e
commit
ad84875afd
44 files changed
+314
-5
No files matched your search
@@ -175,6 +175,10 @@ static int sendTry(uint8_t fc, uint16_t cn, uint32_t delay, bool fmt4041x, bool
|
||||
|
||||
// indala PSK, clock 32, carrier 0
|
||||
lf_psksim_t *payload = calloc(1, sizeof(lf_psksim_t) + sizeof(bs));
|
||||
if (payload == NULL) {
|
||||
PrintAndLogEx(ERR, "Memory allocation failed");
|
||||
return PM3_EMALLOC;
|
||||
}
|
||||
payload->carrier = 2;
|
||||
payload->invert = 0;
|
||||
payload->clock = 32;
|
||||
@@ -756,6 +760,10 @@ static int CmdIndalaSim(const char *Cmd) {
|
||||
|
||||
// indala PSK, clock 32, carrier 0
|
||||
lf_psksim_t *payload = calloc(1, sizeof(lf_psksim_t) + sizeof(bs));
|
||||
if (payload == NULL) {
|
||||
PrintAndLogEx(ERR, "Memory allocation failed");
|
||||
return PM3_EMALLOC;
|
||||
}
|
||||
payload->carrier = 2;
|
||||
payload->invert = 0;
|
||||
payload->clock = 32;
|
||||
|
||||
Reference in new issue
Block a user