summaryrefslogtreecommitdiff
path: root/t/t7001-mv.sh
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2014-03-08 19:29:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-03-11 21:44:21 (GMT)
commit89ccc1b09cf4004e6129c66def42b47206ed6b5f (patch)
tree58dc634d9e32bd49cc5a4d4e0584b389493e985f /t/t7001-mv.sh
parent7bbc4e8fdb33e0a8e42e77cc05460d4c4f615f4d (diff)
downloadgit-89ccc1b09cf4004e6129c66def42b47206ed6b5f.zip
git-89ccc1b09cf4004e6129c66def42b47206ed6b5f.tar.gz
git-89ccc1b09cf4004e6129c66def42b47206ed6b5f.tar.bz2
builtin/mv: fix out of bounds write
When commit a88c915 (mv: move submodules using a gitfile, 2013-07-30) added the submodule_gitfile array, it was not added to the block that enlarges the arrays when we are moving a directory so that we do not have to worry about it being a directory when we perform the actual move. After this, the loop continues over the enlarged set of sources. Since we assume that submodule_gitfile has size argc, if any of the items in the source directory are submodules we are guaranteed to write beyond the end of submodule_gitfile. Fix this by realloc'ing submodule_gitfile at the same time as the other arrays. Reported-by: Guillaume Gelin <contact@ramnes.eu> Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7001-mv.sh')
0 files changed, 0 insertions, 0 deletions