Package: release.debian.org Severity: normal User: release.debian....@packages.debian.org Usertags: unblock
Please unblock package libgit2 It fixes a segfault unblock libgit2/0.27.7+dfsg.1-0.2 -- System Information: Debian Release: buster/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'stable'), (300, 'unstable'), (100, 'experimental'), (1, 'experimental-debug') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.19.0-2-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled
diff -Nru libgit2-0.27.7+dfsg.1/debian/changelog libgit2-0.27.7+dfsg.1/debian/changelog --- libgit2-0.27.7+dfsg.1/debian/changelog 2018-12-26 09:29:30.000000000 -0800 +++ libgit2-0.27.7+dfsg.1/debian/changelog 2019-05-18 20:05:35.000000000 -0700 @@ -1,3 +1,10 @@ +libgit2 (0.27.7+dfsg.1-0.2) unstable; urgency=medium + + * Non-maintainer upload. + * Fix another segfault that was affecting cargo. (Closes: #918854) + + -- Ximin Luo <infini...@debian.org> Sat, 18 May 2019 20:05:35 -0700 + libgit2 (0.27.7+dfsg.1-0.1) unstable; urgency=high * Non-maintainer upload. diff -Nru libgit2-0.27.7+dfsg.1/debian/patches/series libgit2-0.27.7+dfsg.1/debian/patches/series --- libgit2-0.27.7+dfsg.1/debian/patches/series 2018-12-26 09:29:30.000000000 -0800 +++ libgit2-0.27.7+dfsg.1/debian/patches/series 2019-05-18 20:05:35.000000000 -0700 @@ -3,3 +3,4 @@ remove-mbedtls-from-pkgconfig.patch index-Fix-alignment-issues-in-write_disk_entry.patch u-segfault-fix.patch +u-segfault-2-fix.patch diff -Nru libgit2-0.27.7+dfsg.1/debian/patches/u-segfault-2-fix.patch libgit2-0.27.7+dfsg.1/debian/patches/u-segfault-2-fix.patch --- libgit2-0.27.7+dfsg.1/debian/patches/u-segfault-2-fix.patch 1969-12-31 16:00:00.000000000 -0800 +++ libgit2-0.27.7+dfsg.1/debian/patches/u-segfault-2-fix.patch 2019-05-18 20:05:35.000000000 -0700 @@ -0,0 +1,51 @@ +From 9ad96367fbbbbc6aa233bfa2f808a3ec8bf11bb2 Mon Sep 17 00:00:00 2001 +From: Edward Thomson <ethom...@edwardthomson.com> +Date: Wed, 7 Nov 2018 15:31:21 +0000 +Subject: [PATCH] smart transport: only clear url on hard reset + +After creating a transport for a server, we expect to be able to call +`connect`, then invoke subsequent `action` calls. We provide the URL to +these `action` calls, although our built-in transports happen to ignore +it since they've already parsed it into an internal format that they +intend to use (`gitno_connection_data`). + +In ca2eb4608243162a13c427e74526b6422d5a6659, we began clearing the URL +field after a connection, meaning that subsequent calls to transport +`action` callbacks would get a NULL URL, which went undetected since the +builtin transports ignore the URL when they're already connected +(instead of re-parsing it into an internal format). + +Downstream custom transport implementations (eg, LibGit2Sharp) did +notice this change, however. + +Since `reset_stream` is called even when we're not closing the +subtransport, update to only clear the URL when we're closing the +subtransport. This ensures that `action` calls will get the correct URL +information even after a connection. +--- + src/transports/smart.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/src/transports/smart.c b/src/transports/smart.c +index a9459c4338..e972d30ba2 100644 +--- a/src/transports/smart.c ++++ b/src/transports/smart.c +@@ -45,14 +45,13 @@ GIT_INLINE(int) git_smart__reset_stream(transport_smart *t, bool close_subtransp + t->current_stream = NULL; + } + +- if (t->url) { ++ if (close_subtransport) { + git__free(t->url); + t->url = NULL; +- } + +- if (close_subtransport && +- t->wrapped->close(t->wrapped) < 0) +- return -1; ++ if (t->wrapped->close(t->wrapped) < 0) ++ return -1; ++ } + + return 0; + }