commit | 4635768809885bb1c063bc9f9eee38e413f85f0d | [log] [tgz] |
---|---|---|
author | Jeff King <peff@peff.net> | Thu Sep 24 17:07:47 2015 -0400 |
committer | Junio C Hamano <gitster@pobox.com> | Mon Oct 05 11:08:05 2015 -0700 |
tree | 8ae8f250cb48f657b538ed54d646b8b7eb07a974 | |
parent | e9ba678175da28607d57043e1363c6252880dd7f [diff] |
remove_leading_path: use a strbuf for internal storage This function strcpy's directly into a PATH_MAX-sized buffer. There's only one caller, which feeds the git_dir into it, so it's not easy to trigger in practice (even if you fed a large $GIT_DIR through the environment or .git file, it would have to actually exist and be accessible on the filesystem to get to this point). We can fix it by moving to a strbuf. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>