diff options
author | luigi1111 <luigi1111w@gmail.com> | 2020-07-08 17:18:10 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2020-07-08 17:18:10 -0500 |
commit | 228101a72e93f0ac346a85b214eeeca45b8fda1b (patch) | |
tree | a5fa26fb1c70ded550a4de6d3ac1452abde6e1fb | |
parent | Merge pull request #6588 (diff) | |
parent | Fix incorrect lenght of command INS_PREFIX_HASH (diff) | |
download | monero-228101a72e93f0ac346a85b214eeeca45b8fda1b.tar.xz |
Merge pull request #6597
ec46069 Fix incorrect lenght of command INS_PREFIX_HASH (grydz)
-rw-r--r-- | src/device/device_ledger.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/device/device_ledger.cpp b/src/device/device_ledger.cpp index 222a84d3f..0783b00b0 100644 --- a/src/device/device_ledger.cpp +++ b/src/device/device_ledger.cpp @@ -1468,8 +1468,8 @@ namespace hw { offset = set_command_header(INS_PREFIX_HASH,2,cnt); len = pref_length - pref_offset; //options - if (len > (BUFFER_SEND_SIZE-7)) { - len = BUFFER_SEND_SIZE-7; + if (len > (BUFFER_SEND_SIZE-offset-3)) { + len = BUFFER_SEND_SIZE-offset-3; this->buffer_send[offset] = 0x80; } else { this->buffer_send[offset] = 0x00; |