You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
526 B

  1. https://bugs.launchpad.net/hplip/+bug/1672256
  2. memcpy should never be used with overlapping memory regions
  3. --- a/io/hpmud/musb.c
  4. +++ b/io/hpmud/musb.c
  5. @@ -775,7 +775,7 @@ static int device_id(int fd, unsigned ch
  6. len = size-1; /* leave byte for zero termination */
  7. if (len > 2)
  8. len -= 2;
  9. - memcpy(buffer, buffer+2, len); /* remove length */
  10. + memmove(buffer, buffer+2, len); /* remove length */
  11. buffer[len]=0;
  12. DBG("read actual device_id successfully fd=%d len=%d\n", fd, len);