File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
ledger_device_sdk/src/libcall Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,9 @@ pub fn get_check_address_params<const COIN_CONFIG_BUF_SIZE: usize>(
112
112
unsafe {
113
113
params. coin_configuration . copy_to_nonoverlapping (
114
114
check_address_params. coin_config . as_mut_ptr ( ) ,
115
- check_address_params. coin_config_len ,
115
+ check_address_params
116
+ . coin_config_len
117
+ . min ( COIN_CONFIG_BUF_SIZE ) ,
116
118
) ;
117
119
}
118
120
@@ -172,7 +174,9 @@ pub fn get_printable_amount_params<const COIN_CONFIG_BUF_SIZE: usize>(
172
174
unsafe {
173
175
params. coin_configuration . copy_to_nonoverlapping (
174
176
printable_amount_params. coin_config . as_mut_ptr ( ) ,
175
- printable_amount_params. coin_config_len ,
177
+ printable_amount_params
178
+ . coin_config_len
179
+ . min ( COIN_CONFIG_BUF_SIZE ) ,
176
180
) ;
177
181
}
178
182
@@ -230,7 +234,7 @@ pub fn sign_tx_params<const COIN_CONFIG_BUF_SIZE: usize>(
230
234
unsafe {
231
235
params. coin_configuration . copy_to_nonoverlapping (
232
236
create_tx_params. coin_config . as_mut_ptr ( ) ,
233
- create_tx_params. coin_config_len ,
237
+ create_tx_params. coin_config_len . min ( COIN_CONFIG_BUF_SIZE ) ,
234
238
) ;
235
239
}
236
240
You can’t perform that action at this time.
0 commit comments