summaryrefslogtreecommitdiff
path: root/builtin/rev-list.c
diff options
context:
space:
mode:
authorClemens Buchacher <drizzd@aon.at>2012-02-13 20:17:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-02-13 20:49:15 (GMT)
commitcb8da70547af5cd5c8e03be5a236971951e81277 (patch)
tree17f6330e734a92f05263cac4818ff862adb19665 /builtin/rev-list.c
parentd0482e88a735787f7bb33ef4783be0e7f6a70946 (diff)
downloadgit-cb8da70547af5cd5c8e03be5a236971951e81277.zip
git-cb8da70547af5cd5c8e03be5a236971951e81277.tar.gz
git-cb8da70547af5cd5c8e03be5a236971951e81277.tar.bz2
git rev-list: fix invalid typecast
git rev-list passes rev_list_info, not rev_list objects. Without this fix, rev-list enables or disables the --verify-objects option depending on a read from an undefined memory location. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/rev-list.c')
-rw-r--r--builtin/rev-list.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/rev-list.c b/builtin/rev-list.c
index ab3be7c..264e3ae 100644
--- a/builtin/rev-list.c
+++ b/builtin/rev-list.c
@@ -180,10 +180,10 @@ static void show_object(struct object *obj,
const struct name_path *path, const char *component,
void *cb_data)
{
- struct rev_info *info = cb_data;
+ struct rev_list_info *info = cb_data;
finish_object(obj, path, component, cb_data);
- if (info->verify_objects && !obj->parsed && obj->type != OBJ_COMMIT)
+ if (info->revs->verify_objects && !obj->parsed && obj->type != OBJ_COMMIT)
parse_object(obj->sha1);
show_object_with_name(stdout, obj, path, component);
}