Avoid an undefined behavior of memcpy() in gzappend().

This commit is contained in:
Mark Adler 2017-10-12 19:27:59 -07:00
parent 3c46f5ddb5
commit ae49d1472e

View File

@ -137,7 +137,7 @@ local void rotate(unsigned char *list, unsigned len, unsigned rot)
/* do simple left shift by one */
if (rot == 1) {
tmp = *list;
memcpy(list, list + 1, len - 1);
memmove(list, list + 1, len - 1);
*last = tmp;
return;
}