summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2ab4de5)
raw | patch | inline | side by side (parent: 2ab4de5)
author | Thomas Rast <trast@student.ethz.ch> | |
Sat, 6 Dec 2008 20:50:09 +0000 (21:50 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 7 Dec 2008 10:41:45 +0000 (02:41 -0800) |
memcpy() may only be used for disjoint memory areas, but when invoked
from cmd_fetch_pack(), we have my_args == &args. (The argument cannot
be removed entirely because transport.c invokes with its own
variable.)
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
from cmd_fetch_pack(), we have my_args == &args. (The argument cannot
be removed entirely because transport.c invokes with its own
variable.)
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-fetch-pack.c | patch | blob | history |
diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c
index 21ce3e016314e0c8500c9010b2ff214b1e05e022..22a57121a8cd58c43008e46fec4a4b8348310724 100644 (file)
--- a/builtin-fetch-pack.c
+++ b/builtin-fetch-pack.c
struct ref *ref_cpy;
fetch_pack_setup();
- memcpy(&args, my_args, sizeof(args));
+ if (&args != my_args)
+ memcpy(&args, my_args, sizeof(args));
if (args.depth > 0) {
if (stat(git_path("shallow"), &st))
st.st_mtime = 0;