summaryrefslogtreecommitdiff
path: root/line-log.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-03-16 13:56:42 -0700
committerJunio C Hamano <gitster@pobox.com>2017-03-16 13:56:42 -0700
commit3d0449ded882cb59257a02a50a212d2e49eca634 (patch)
tree753a2f94f2f1b82a056f11dc6f1c829927594964 /line-log.c
parentc5bd9e5a97ab987334b8dead3ffd353332014949 (diff)
parent07f546cda5d818780821a371f011eb253646ddc3 (diff)
downloadgit-3d0449ded882cb59257a02a50a212d2e49eca634.tar.gz
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
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);