mirror of
https://github.com/monero-project/monero.git
synced 2026-01-23 04:44:23 +01:00
device_ledger: fix buffer underflow on bad data from device
This commit is contained in:
@@ -304,6 +304,7 @@ namespace hw {
|
|||||||
SCARD_PCI_T0, this->buffer_send, this->length_send,
|
SCARD_PCI_T0, this->buffer_send, this->length_send,
|
||||||
NULL, this->buffer_recv, &this->length_recv);
|
NULL, this->buffer_recv, &this->length_recv);
|
||||||
ASSERT_RV(rv);
|
ASSERT_RV(rv);
|
||||||
|
ASSERT_T0(this->length_recv >= 2);
|
||||||
ASSERT_T0(this->length_recv <= BUFFER_RECV_SIZE);
|
ASSERT_T0(this->length_recv <= BUFFER_RECV_SIZE);
|
||||||
logRESP();
|
logRESP();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user