diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-03-16 13:56:42 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-03-16 13:56:42 -0700 |
commit | 3d0449ded882cb59257a02a50a212d2e49eca634 (patch) | |
tree | 753a2f94f2f1b82a056f11dc6f1c829927594964 /line-log.c | |
parent | c5bd9e5a97ab987334b8dead3ffd353332014949 (diff) | |
parent | 07f546cda5d818780821a371f011eb253646ddc3 (diff) | |
download | git-3d0449ded882cb59257a02a50a212d2e49eca634.tar.gz git-3d0449ded882cb59257a02a50a212d2e49eca634.tar.xz |
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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/line-log.c b/line-log.c index 951029665..a23b91047 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); |