зеркало из https://github.com/microsoft/git.git
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:
Коммит
3d0449ded8
|
@ -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)
|
static void range_set_copy(struct range_set *dst, struct range_set *src)
|
||||||
{
|
{
|
||||||
range_set_init(dst, src->nr);
|
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;
|
dst->nr = src->nr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void range_set_move(struct range_set *dst, struct range_set *src)
|
static void range_set_move(struct range_set *dst, struct range_set *src)
|
||||||
{
|
{
|
||||||
range_set_release(dst);
|
range_set_release(dst);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче