24 lines
727 B
Text
24 lines
727 B
Text
|
backwards memcpy
|
||
|
|
||
|
Index: io/hpmud/musb.c
|
||
|
--- io/hpmud/musb.c.orig
|
||
|
+++ io/hpmud/musb.c
|
||
|
@@ -776,7 +776,7 @@ static int device_id(int fd, unsigned char *buffer, in
|
||
|
len = size-1; /* leave byte for zero termination */
|
||
|
if (len > 2)
|
||
|
len -= 2;
|
||
|
- memcpy(buffer, buffer+2, len); /* remove length */
|
||
|
+ memmove(buffer, buffer+2, len); /* remove length */
|
||
|
buffer[len]=0;
|
||
|
DBG("read actual device_id successfully fd=%d len=%d\n", fd, len);
|
||
|
|
||
|
@@ -1263,7 +1263,7 @@ enum HPMUD_RESULT __attribute__ ((visibility ("hidden"
|
||
|
|
||
|
if (*len)
|
||
|
{
|
||
|
- memcpy(buf, pd->id, *len > size ? size : *len);
|
||
|
+ memmove(buf, pd->id, *len > size ? size : *len);
|
||
|
stat = HPMUD_R_OK;
|
||
|
}
|
||
|
|