Message ID | alpine.DEB.2.22.394.2111041801150.2137366@digraph.polyomino.org.uk |
---|---|
State | New |
Headers | show |
Series | Fix memmove call in vfprintf-internal.c:group_number | expand |
Ping. This patch <https://sourceware.org/pipermail/libc-alpha/2021-November/132669.html> is pending review.
Thank you; this patch looks good.
diff --git a/stdio-common/vfprintf-internal.c b/stdio-common/vfprintf-internal.c index 415f038141..355ba582e6 100644 --- a/stdio-common/vfprintf-internal.c +++ b/stdio-common/vfprintf-internal.c @@ -2090,7 +2090,8 @@ group_number (CHAR_T *front_ptr, CHAR_T *w, CHAR_T *rear_ptr, copy_rest: /* No further grouping to be done. Copy the rest of the number. */ - memmove (w, s, (front_ptr -s) * sizeof (CHAR_T)); + w -= s - front_ptr; + memmove (w, front_ptr, (s - front_ptr) * sizeof (CHAR_T)); break; } else if (*grouping != '\0')