Merge branch 'jk/http-walker-buffer-underflow-fix'
[gitweb.git] / builtin / receive-pack.c
index f2c6953a39f6c1369725494cfc36b108cdb097a6..83492af05f2bfd8ca1ec796b7ae8dccc84f0f31b 100644 (file)
@@ -1417,7 +1417,7 @@ static void execute_commands(struct command *commands,
 {
        struct check_connected_options opt = CHECK_CONNECTED_INIT;
        struct command *cmd;
-       unsigned char sha1[20];
+       struct object_id oid;
        struct iterate_data data;
        struct async muxer;
        int err_fd = 0;
@@ -1474,7 +1474,7 @@ static void execute_commands(struct command *commands,
        check_aliased_updates(commands);
 
        free(head_name_to_free);
-       head_name = head_name_to_free = resolve_refdup("HEAD", 0, sha1, NULL);
+       head_name = head_name_to_free = resolve_refdup("HEAD", 0, oid.hash, NULL);
 
        if (use_atomic)
                execute_commands_atomic(commands, si);