Skip to content

Commit b10d3f7

Browse files
committed
Using memmove instead of memcpy to remove dependency on GLIBC_2.14
http://stackoverflow.com/questions/8823267/linking-against-older-symbol-version-in-a-so-file
1 parent 5620800 commit b10d3f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Samba.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ Samba::readXmodem(uint8_t* buffer, int size)
378378

379379
_port->put(ACK);
380380

381-
memcpy(buffer, &blk[3], min(size, BLK_SIZE));
381+
memmove(buffer, &blk[3], min(size, BLK_SIZE));
382382
buffer += BLK_SIZE;
383383
size -= BLK_SIZE;
384384
blkNum++;
@@ -418,7 +418,7 @@ Samba::writeXmodem(const uint8_t* buffer, int size)
418418
blk[0] = SOH;
419419
blk[1] = (blkNum & 0xff);
420420
blk[2] = ~(blkNum & 0xff);
421-
memcpy(&blk[3], buffer, min(size, BLK_SIZE));
421+
memmove(&blk[3], buffer, min(size, BLK_SIZE));
422422
if (size < BLK_SIZE)
423423
memset(&blk[3] + size, 0, BLK_SIZE - size);
424424
crc16Add(blk);

0 commit comments

Comments
 (0)