mirror of
https://github.com/monero-project/monero.git
synced 2024-12-27 02:29:26 -05:00
Fix incorrect lenght of command INS_PREFIX_HASH
buffer_send[4] (LC) is an unsigned char, len should not exceed 254 (255 - 1 for the option).
This commit is contained in:
parent
25419b4bfb
commit
4e6d587275
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user