зеркало из https://github.com/microsoft/git.git
object-info: init request_info before reading arg
When retrieving object info via capability "object-info", we store the command args into a requested_info variable, but forget to initialize it. Initialize the variable before use to prevent unexpected output. Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
7556e5d737
Коммит
dc12ee77ab
|
@ -77,7 +77,7 @@ static void send_info(struct repository *r, struct packet_writer *writer,
|
|||
|
||||
int cap_object_info(struct repository *r, struct packet_reader *request)
|
||||
{
|
||||
struct requested_info info;
|
||||
struct requested_info info = { 0 };
|
||||
struct packet_writer writer;
|
||||
struct string_list oid_str_list = STRING_LIST_INIT_DUP;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче