From: Jay Satiro Date: Fri, 16 Jun 2017 05:58:23 +0000 (-0400) Subject: mk-ca-bundle.pl: Check curl's exit code after certdata download X-Git-Tag: curl-7_55_0~186 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec92afc3f4b2ecdd26b01b6a59e8fbddd5783e67;p=thirdparty%2Fcurl.git mk-ca-bundle.pl: Check curl's exit code after certdata download - No longer allow partial downloads of certdata. Prior to this change partial downloads were (erroneously?) allowed since only the server code was checked to be 200. Bug: https://github.com/curl/curl/pull/1577 Reported-by: Matteo B. --- diff --git a/lib/mk-ca-bundle.pl b/lib/mk-ca-bundle.pl index 9574f1dbf9..cc36c7680c 100755 --- a/lib/mk-ca-bundle.pl +++ b/lib/mk-ca-bundle.pl @@ -310,7 +310,7 @@ if(!$opt_n) { my $proto = !$opt_k ? "--proto =https" : ""; my $quiet = $opt_q ? "-s" : ""; my @out = `curl -w %{response_code} $proto $quiet -o "$txt" "$url"`; - if(@out && $out[0] == 200) { + if(!$? && @out && $out[0] == 200) { $fetched = 1; report "Downloaded $txt"; }