X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/395ec4e99ca757472fa962345552e3f01ea0c154..e72d1fbba2281c5868c3cf6b9a93b4faaf18c2a7:/client/cmdhfmf.c diff --git a/client/cmdhfmf.c b/client/cmdhfmf.c index 7736b9c5..cde20d79 100644 --- a/client/cmdhfmf.c +++ b/client/cmdhfmf.c @@ -2052,6 +2052,11 @@ int CmdHF14AMfSniff(const char *Cmd){ bufsize = traceLen; memset(buf, 0x00, traceLen); } + if (bufPtr == NULL) { + PrintAndLog("Cannot allocate memory for trace"); + free(buf); + return 2; + } memcpy(bufPtr, resp.d.asBytes, len); bufPtr += len; pckNum++;