libcacard/vreader: Tighten assertion to clarify intent
Bonus: hushes up Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
fa5912a17b
commit
f33a984d51
@ -283,7 +283,7 @@ vreader_xfr_bytes(VReader *reader,
|
||||
response->b_sw2, response->b_len, response->b_total_len);
|
||||
}
|
||||
}
|
||||
assert(card_status == VCARD_DONE);
|
||||
assert(card_status == VCARD_DONE && response);
|
||||
int size = MIN(*receive_buf_len, response->b_total_len);
|
||||
memcpy(receive_buf, response->b_data, size);
|
||||
*receive_buf_len = size;
|
||||
|
Loading…
Reference in New Issue
Block a user