Merge branch 'vn/line-log-memcpy-size-fix' into maint

The command-line parsing of "git log -L" copied internal data
structures using incorrect size on ILP32 systems.

* vn/line-log-memcpy-size-fix:
  line-log: use COPY_ARRAY to fix mis-sized memcpy
This commit is contained in:
Junio C Hamano 2017-03-16 13:56:42 -07:00
commit 3d0449ded8

View File

@ -43,9 +43,10 @@ void range_set_release(struct range_set *rs)
static void range_set_copy(struct range_set *dst, struct range_set *src)
{
range_set_init(dst, src->nr);
memcpy(dst->ranges, src->ranges, src->nr*sizeof(struct range_set));
COPY_ARRAY(dst->ranges, src->ranges, src->nr);
dst->nr = src->nr;
}
static void range_set_move(struct range_set *dst, struct range_set *src)
{
range_set_release(dst);