From: izsh@fail0verflow.com Date: Sun, 20 Oct 2013 11:46:51 +0000 (+0000) Subject: cmdhf14b.c: fixing a crash in the crc computation when missing data (e.g. with 'hf... X-Git-Tag: v1.0.0~35 X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/06b82e6a6d84d81ba84140dcd1417fcd27b71554?hp=3f7c993d783b17f5dd112dfbf3966e992d2fae19 cmdhf14b.c: fixing a crash in the crc computation when missing data (e.g. with 'hf 14b raw -c -p') --- diff --git a/client/cmdhf14b.c b/client/cmdhf14b.c index 5317994f..6696ac09 100644 --- a/client/cmdhf14b.c +++ b/client/cmdhf14b.c @@ -334,6 +334,11 @@ int CmdHF14BCmdRaw (const char *cmd) { PrintAndLog("Invalid char on input"); return 0; } + if (datalen == 0) + { + PrintAndLog("Missing data input"); + return 0; + } if(crc) { uint8_t first, second;