d5312370b4
Fixes <https://issues.guix.gnu.org/72859>. * gnu/packages/patches/libgit2-uninitialized-proxy-settings.patch: Update. Reported-by: Rodion Goritskov <rodion.goritskov@gmail.com> Change-Id: I4fc1eec1094139572a02bce2dd15d3664dbf2c49
29 lines
1.3 KiB
Diff
29 lines
1.3 KiB
Diff
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);
|
|
}
|