diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-06-23 15:43:31 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-06-23 15:43:31 +0100 |
commit | 34de7bc267984340d0c6c0afcbb1069af2f81e6d (patch) | |
tree | 61d11a2ce6c8c05b84c2bcf430770b77a673969d /src/device/device_ledger.cpp | |
parent | device: misc cleanup (diff) | |
download | monero-34de7bc267984340d0c6c0afcbb1069af2f81e6d.tar.xz |
device_ledger: fix buffer underflow on bad data from device
Diffstat (limited to 'src/device/device_ledger.cpp')
-rw-r--r-- | src/device/device_ledger.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/device/device_ledger.cpp b/src/device/device_ledger.cpp index 8735baeb6..bc7f37789 100644 --- a/src/device/device_ledger.cpp +++ b/src/device/device_ledger.cpp @@ -304,6 +304,7 @@ namespace hw { SCARD_PCI_T0, this->buffer_send, this->length_send, NULL, this->buffer_recv, &this->length_recv); ASSERT_RV(rv); + ASSERT_T0(this->length_recv >= 2); ASSERT_T0(this->length_recv <= BUFFER_RECV_SIZE); logRESP(); |