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:
Markus Armbruster 2014-05-23 13:24:36 +02:00 committed by Michael Tokarev
parent fa5912a17b
commit f33a984d51

View File

@ -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;