@@ -97,7 +97,7 @@ bool copyTxData(txContext_t *context, uint8_t *out, uint32_t length) {
9797 return false;
9898 }
9999 if (out != NULL ) {
100- memmove (out , context -> workBuffer , length );
100+ memmove (out + context -> currentFieldPos , context -> workBuffer , length );
101101 }
102102 if (!(context -> processingField && context -> fieldSingleByte )) {
103103 if (cx_hash_no_throw ((cx_hash_t * ) context -> sha3 ,
@@ -215,9 +215,7 @@ static bool processStartGas(txContext_t *context) {
215215 if (context -> currentFieldPos < context -> currentFieldLength ) {
216216 uint32_t copySize =
217217 MIN (context -> commandLength , context -> currentFieldLength - context -> currentFieldPos );
218- if (copyTxData (context ,
219- context -> content -> startgas .value + context -> currentFieldPos ,
220- copySize ) == false) {
218+ if (copyTxData (context , context -> content -> startgas .value , copySize ) == false) {
221219 return false;
222220 }
223221 }
@@ -242,9 +240,7 @@ static bool processGasprice(txContext_t *context) {
242240 if (context -> currentFieldPos < context -> currentFieldLength ) {
243241 uint32_t copySize =
244242 MIN (context -> commandLength , context -> currentFieldLength - context -> currentFieldPos );
245- if (copyTxData (context ,
246- context -> content -> gasprice .value + context -> currentFieldPos ,
247- copySize ) == false) {
243+ if (copyTxData (context , context -> content -> gasprice .value , copySize ) == false) {
248244 return false;
249245 }
250246 }
@@ -264,9 +260,7 @@ static bool processValue(txContext_t *context) {
264260 if (context -> currentFieldPos < context -> currentFieldLength ) {
265261 uint32_t copySize =
266262 MIN (context -> commandLength , context -> currentFieldLength - context -> currentFieldPos );
267- if (copyTxData (context ,
268- context -> content -> value .value + context -> currentFieldPos ,
269- copySize ) == false) {
263+ if (copyTxData (context , context -> content -> value .value , copySize ) == false) {
270264 return false;
271265 }
272266 }
@@ -286,9 +280,7 @@ static bool processTo(txContext_t *context) {
286280 if (context -> currentFieldPos < context -> currentFieldLength ) {
287281 uint32_t copySize =
288282 MIN (context -> commandLength , context -> currentFieldLength - context -> currentFieldPos );
289- if (copyTxData (context ,
290- context -> content -> destination + context -> currentFieldPos ,
291- copySize ) == false) {
283+ if (copyTxData (context , context -> content -> destination , copySize ) == false) {
292284 return false;
293285 }
294286 }
@@ -381,8 +373,7 @@ static bool processV(txContext_t *context) {
381373 MIN (context -> commandLength , context -> currentFieldLength - context -> currentFieldPos );
382374 // Make sure we do not copy more than the size of v.
383375 copySize = MIN (copySize , sizeof (context -> content -> v ));
384- if (copyTxData (context , context -> content -> v + context -> currentFieldPos , copySize ) ==
385- false) {
376+ if (copyTxData (context , context -> content -> v , copySize ) == false) {
386377 return false;
387378 }
388379 }
0 commit comments