[PATCH] name-hash: fix buffer overrun
- From
- git@jeffhostetler.com <git@jeffhostetler.com>
- Date
- Mar 31, 2017, 17:32 UTC
- Message-ID
- <20170331173214.47514-1-git@jeffhostetler.com>
From: Jeff Hostetler <jeffhost@microsoft.com>
Fix buffer overrun in handle_range_dir() when the final entry in the index was the only file in the last directory, such as "a/b/foo.txt". The look ahead (k_start + 1) was invalid since (k_start + 1) == k_end.
This bug was introduced by Jeff in "jh/memihash-opt" which was recently merged into master.
Kevin Willford (1): name-hash: fix buffer overrun
name-hash.c | 4 +++- t/t3008-ls-files-lazy-init-name-hash.sh | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 t/t3008-ls-files-lazy-init-name-hash.sh
-- 2.9.3