proxmark3 icon indicating copy to clipboard operation
proxmark3 copied to clipboard

cppcheck cmdhfmfhard.c redundant assignment

Open doegox opened this issue 2 years ago • 1 comments

In cmdhfmfhard.c

        if (!initialize) {
            uint16_t num_sampled_nonces = resp.oldarg[2];
            uint8_t *bufp = resp.data.asBytes;
            for (uint16_t i = 0; i < num_sampled_nonces; i += 2) {

image

Indeed resp is declared but not initialized. Even memsetting it doesn't fix the logic as we're looping on it. I don't know what should be the logic here...

doegox avatar Sep 03 '21 23:09 doegox

:) can we make a NULL check for it?

Ps. @pwpiwi would be better at it

iceman1001 avatar Sep 04 '21 08:09 iceman1001