aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2020-06-19 15:59:50 -0500
committerluigi1111 <luigi1111w@gmail.com>2020-06-19 15:59:50 -0500
commit79f4af310e06b05616247cd90665e716febe8716 (patch)
treedab61739c22477445416fcff34de5e100d2d8c0d
parentMerge pull request #6579 (diff)
parentFix incorrect lenght of command INS_PREFIX_HASH (diff)
downloadmonero-79f4af310e06b05616247cd90665e716febe8716.tar.xz
Merge pull request #6594
4e6d587 Fix incorrect lenght of command INS_PREFIX_HASH (grydz)
-rw-r--r--src/device/device_ledger.cpp4
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;