diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2020-05-07 13:17:33 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-05-08 11:01:27 -0700 |
commit | 0eeb3be4c4b297f9edb94c4741af606df396985d (patch) | |
tree | 3e159228047fe3c644fd69e209d74867843a81f2 /t/t5100/rfc2047-info-0010 | |
parent | sparse-checkout: provide a new reapply subcommand (diff) | |
download | tgif-0eeb3be4c4b297f9edb94c4741af606df396985d.tar.xz |
unpack-trees: avoid array out-of-bounds error
The loop in warn_conflicted_path() that checks for the count of
entries with the same path uses "i+count" for the array
entry. However, the loop only verifies that the value of count is
below the array size. Fix this by adding i to the condition.
I hit this condition during a test of the in-tree sparse-checkout
feature, so it is exercised by the end of the series.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
[jc: readability fix]
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5100/rfc2047-info-0010')
0 files changed, 0 insertions, 0 deletions