mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-19 19:38:52 +08:00
FIX: CoverityScan 123358 and 133864 - Unchecked return value
This commit is contained in:
parent
3f5bcc3b92
commit
987c59849e
1 changed files with 8 additions and 2 deletions
|
@ -579,7 +579,10 @@ int CmdLegicCalcCrc8(const char *Cmd){
|
|||
// peek at length of the input string so we can
|
||||
// figure out how many elements to malloc in "data"
|
||||
bg=en=0;
|
||||
param_getptr(Cmd, &bg, &en, cmdp+1);
|
||||
if (param_getptr(Cmd, &bg, &en, cmdp+1)) {
|
||||
errors = true;
|
||||
break;
|
||||
}
|
||||
len = (en - bg + 1);
|
||||
|
||||
// check that user entered even number of characters
|
||||
|
@ -599,7 +602,10 @@ int CmdLegicCalcCrc8(const char *Cmd){
|
|||
break;
|
||||
}
|
||||
|
||||
param_gethex(Cmd, cmdp+1, data, len);
|
||||
if (param_gethex(Cmd, cmdp+1, data, len)) {
|
||||
errors = true;
|
||||
break;
|
||||
}
|
||||
|
||||
len >>= 1;
|
||||
cmdp += 2;
|
||||
|
|
Loading…
Add table
Reference in a new issue