mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-23 07:37:23 +08:00
cppcheck avoid dereferencing potentially null pointer
This commit is contained in:
parent
0830cfcf1c
commit
d3c6c430a8
1 changed files with 3 additions and 0 deletions
|
@ -144,6 +144,9 @@ void LRPIncCounter(uint8_t *ctr, size_t ctrlen) {
|
|||
void LRPEncode(LRPContext_t *ctx, uint8_t *data, size_t datalen, uint8_t *resp, size_t *resplen) {
|
||||
*resplen = 0;
|
||||
|
||||
if (data == NULL) {
|
||||
return;
|
||||
}
|
||||
uint8_t xdata[1024] = {0};
|
||||
memcpy(xdata, data, datalen);
|
||||
if (ctx->useBitPadding) {
|
||||
|
|
Loading…
Reference in a new issue