gnu: libgit2@1.8: Fix more uninitialized value uses.

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
This commit is contained in:
Ludovic Courtès 2024-08-29 13:47:38 +02:00
parent 09fe58e08c
commit d5312370b4
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -1,4 +1,4 @@
Fix use of uninitialized value in the http-parser backend, a bug introduced
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
@ -6,7 +6,7 @@ in libgit2 1.8.1:
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..1f0e65372 100644
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(
@ -17,3 +17,12 @@ index 50ba6d2e0..1f0e65372 100644
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);
}