mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 13:00:42 -07:00
cppcheck uninitialized vars
This commit is contained in:
parent
0fbc101ac5
commit
951d6cd218
3 changed files with 5 additions and 1 deletions
|
@ -404,7 +404,7 @@ static int CmdIndalaDemodAlt(const char *Cmd) {
|
||||||
uint8_t data[MAX_GRAPH_TRACE_LEN] = {0};
|
uint8_t data[MAX_GRAPH_TRACE_LEN] = {0};
|
||||||
size_t datasize = getFromGraphBuf(data);
|
size_t datasize = getFromGraphBuf(data);
|
||||||
|
|
||||||
uint8_t rawbits[4096];
|
uint8_t rawbits[4096] = {0};
|
||||||
int rawbit = 0;
|
int rawbit = 0;
|
||||||
int worst = 0, worstPos = 0;
|
int worst = 0, worstPos = 0;
|
||||||
|
|
||||||
|
|
|
@ -331,6 +331,8 @@ static bool checkValidCmd(uint32_t decrypted) {
|
||||||
static bool checkValidCmdByte(uint8_t *cmd, uint16_t n) {
|
static bool checkValidCmdByte(uint8_t *cmd, uint16_t n) {
|
||||||
|
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
|
if (cmd == NULL)
|
||||||
|
return false;
|
||||||
for (int i = 0; i < 8; ++i) {
|
for (int i = 0; i < 8; ++i) {
|
||||||
if (cmd[0] == cmds[i][0]) {
|
if (cmd[0] == cmds[i][0]) {
|
||||||
|
|
||||||
|
|
|
@ -174,6 +174,8 @@ static char *sprint_hex_inrow_ex(const uint8_t *data, const size_t len, const si
|
||||||
static bool checkValidCmdByte(uint8_t *cmd, uint16_t n) {
|
static bool checkValidCmdByte(uint8_t *cmd, uint16_t n) {
|
||||||
|
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
|
if (cmd == NULL)
|
||||||
|
return false;
|
||||||
for (int i = 0; i < 8; ++i) {
|
for (int i = 0; i < 8; ++i) {
|
||||||
if (cmd[0] == cmds[i][0]) {
|
if (cmd[0] == cmds[i][0]) {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue