unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 54116ce1a28bf9b1f212315fb15086c462d34274 1299 bytes (raw)
name: packages/patches/libgit2-uninitialized-proxy-settings.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 
Fix uses of uninitialized values in the http-parser backend, a bug introduced
in libgit2 1.8.1:

  https://github.com/libgit2/libgit2/pull/6870

This code is exercised by 'tests/proxy.scm' in Guile-Git.

diff --git a/src/libgit2/transports/httpparser.c b/src/libgit2/transports/httpparser.c
index 50ba6d2e0..c19499b84 100644
--- a/src/libgit2/transports/httpparser.c
+++ b/src/libgit2/transports/httpparser.c
@@ -71,6 +71,7 @@ size_t git_http_parser_execute(
 {
 	struct http_parser_settings settings_proxy;
 
+	settings_proxy.on_status = NULL;
 	settings_proxy.on_message_begin = parser->settings.on_message_begin ? on_message_begin : NULL;
 	settings_proxy.on_url = parser->settings.on_url ? on_url : NULL;
 	settings_proxy.on_header_field = parser->settings.on_header_field ? on_header_field : NULL;
@@ -78,6 +79,8 @@ size_t git_http_parser_execute(
 	settings_proxy.on_headers_complete = parser->settings.on_headers_complete ? on_headers_complete : NULL;
 	settings_proxy.on_body = parser->settings.on_body ? on_body : NULL;
 	settings_proxy.on_message_complete = parser->settings.on_message_complete ? on_message_complete : NULL;
+	settings_proxy.on_chunk_header = NULL;
+	settings_proxy.on_chunk_complete = NULL;
 
 	return http_parser_execute(&parser->parser, &settings_proxy, data, len);
 }

debug log:

solving 54116ce1a28bf9b1f212315fb15086c462d34274 ...
found 54116ce1a28bf9b1f212315fb15086c462d34274 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).