summaryrefslogtreecommitdiff
path: root/line-log.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-03-12 23:21:35 -0700
committerJunio C Hamano <gitster@pobox.com>2017-03-12 23:21:35 -0700
commit6c621015f2b5028b8743da0b13293cc99fb2be6b (patch)
treed3f729a788ef9ff185f1f143ae03fa9809108bfe /line-log.c
parentcb36508ac50baa3f8b2df9bc2c69c260c5977b8f (diff)
parent07f546cda5d818780821a371f011eb253646ddc3 (diff)
downloadgit-6c621015f2b5028b8743da0b13293cc99fb2be6b.tar.gz
Merge branch 'vn/line-log-memcpy-size-fix'
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
Diffstat (limited to 'line-log.c')
-rw-r--r--line-log.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/line-log.c b/line-log.c
index 9510296659..a23b910471 100644
--- a/line-log.c
+++ b/line-log.c
@@ -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);