Permalink
Browse files

Fix buffer on bad data from device

  • Loading branch information...
miltonf committed Nov 25, 2018
1 parent fb64790 commit 5c895612aeafacd059af137a75a9f3daddf77300
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/device/device_ledger.cpp
@@ -293,6 +293,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();

0 comments on commit 5c89561

Please sign in to comment.