merge-base, xdiff: zero out xpparam_t structures
authorMichał Kępień <michal@isc.org>
Tue, 20 Oct 2020 06:48:08 +0000 (08:48 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 20 Oct 2020 19:53:26 +0000 (12:53 -0700)
commitec7967cfafd5844e33afbc1e6fb8ba1b9e5b111b
treefbe510604f80b470f7ab46871eb1e43e7a1903d9
parent47ae905ffb98cc4d4fd90083da6bc8dab55d9ecc
merge-base, xdiff: zero out xpparam_t structures

xpparam_t structures are usually zero-initialized before their specific
fields are assigned to, but there are three locations in the tree where
that does not happen.  Add the missing memset() calls in order to make
initialization of xpparam_t structures consistent tree-wide and to
prevent stack garbage from being used as field values.

Signed-off-by: Michał Kępień <michal@isc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/merge-tree.c
xdiff/xhistogram.c
xdiff/xpatience.c