Fix possible overflow
Note that this could happen e.g. if a fake PN533 sends malicious frames over USB CID 1090329 (#1 of 1): Overflowed return value (INTEGER_OVERFLOW) overflow_sink: Overflowed or truncated value (or a value computed from an overflowed or truncated value) "res" used as return value.
This commit is contained in:
parent
618ca1e92b
commit
90160d6507
1 changed files with 3 additions and 0 deletions
|
@ -1150,6 +1150,9 @@ pn53x_initiator_select_passive_target_ext(struct nfc_device *pnd,
|
|||
if ((res = pn53x_InListPassiveTarget(pnd, pm, 1, pbtInitData, szInitData, abtTargetsData, &szTargetsData, timeout)) <= 0)
|
||||
return res;
|
||||
|
||||
if (szTargetsData <= 1) // For Coverity to know szTargetsData is always > 1 if res > 0
|
||||
return 0;
|
||||
|
||||
// Is a tag info struct available
|
||||
if (pnt) {
|
||||
pnt->nm = nm;
|
||||
|
|
Loading…
Reference in a new issue