mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-07 00:28:07 +08:00
FIX: Coverity Scan complains that the realloc might fail..
This commit is contained in:
parent
bf22fab73b
commit
05fd71264a
1 changed files with 5 additions and 2 deletions
|
@ -473,9 +473,12 @@ chkres(int *resc, model_t **result, const poly_t divisor, const poly_t init, int
|
|||
pfree(&xor);
|
||||
if(aptr != eptr) return;
|
||||
|
||||
if(!(*result = realloc(*result, ++*resc * sizeof(model_t))))
|
||||
*result = realloc(*result, ++*resc * sizeof(model_t));
|
||||
if (!*result) {
|
||||
uerror("cannot reallocate result array");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
rptr = *result + *resc - 1;
|
||||
rptr->spoly = pclone(divisor);
|
||||
rptr->init = pclone(init);
|
||||
|
|
Loading…
Reference in a new issue