public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Kamil Dudka <kdudka@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/curl] curl-v8.21.0-9: openssl: fix incorrect CURLE_OUT_OF_MEMORY error
Date: Mon, 02 Nov 2026 14:31:32 GMT	[thread overview]
Message-ID: <179362989237.1.7492965705354384107.rpms-curl-cbc7b73e1001@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/curl
            Branch : curl-v8.21.0-9
            Commit : cbc7b73e100155546f78c00c43019c5e23b17985
            Author : Kamil Dudka <kdudka@redhat.com>
            Date   : 2022-03-15T12:53:45+01:00
            Stats  : +43/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/curl/c/cbc7b73e100155546f78c00c43019c5e23b17985?branch=curl-v8.21.0-9

            Log:
            openssl: fix incorrect CURLE_OUT_OF_MEMORY error

... on CN check failure, which was breaking the test-suite of pycurl.

Reported-by: Lukas Zaoral

---
diff --git a/0001-curl-7.82.0-openssl-spurious-oom.patch b/0001-curl-7.82.0-openssl-spurious-oom.patch
new file mode 100644
index 0000000..186134d
--- /dev/null
+++ b/0001-curl-7.82.0-openssl-spurious-oom.patch
@@ -0,0 +1,36 @@
+From 58781adaaff911303f69876236918b9049dde926 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <daniel@haxx.se>
+Date: Tue, 8 Mar 2022 13:38:13 +0100
+Subject: [PATCH] openssl: fix CN check error code
+
+Due to a missing 'else' this returns error too easily.
+
+Regressed in: d15692ebb
+
+Reported-by: Kristoffer Gleditsch
+Fixes #8559
+Closes #8560
+
+Upstream-commit: 911714d617c106ed5d553bf003e34ec94ab6a136
+Signed-off-by: Kamil Dudka <kdudka@redhat.com>
+---
+ lib/vtls/openssl.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
+index 616a510..1bafe96 100644
+--- a/lib/vtls/openssl.c
++++ b/lib/vtls/openssl.c
+@@ -1808,7 +1808,8 @@ CURLcode Curl_ossl_verifyhost(struct Curl_easy *data, struct connectdata *conn,
+               memcpy(peer_CN, ASN1_STRING_get0_data(tmp), peerlen);
+               peer_CN[peerlen] = '\0';
+             }
+-            result = CURLE_OUT_OF_MEMORY;
++            else
++              result = CURLE_OUT_OF_MEMORY;
+           }
+         }
+         else /* not a UTF8 name */
+-- 
+2.34.1
+

diff --git a/curl.spec b/curl.spec
index 0e4f95e..ce5b16e 100644
--- a/curl.spec
+++ b/curl.spec
@@ -10,6 +10,9 @@ Source1: https://curl.se/download/%{name}-%{version}.tar.xz.asc
 # which points to the GPG key as of April 7th 2016 of https://daniel.haxx.se/mykey.asc
 Source2: mykey.asc
 
+# openssl: fix incorrect CURLE_OUT_OF_MEMORY error on CN check failure
+Patch1: 0001-curl-7.82.0-openssl-spurious-oom.patch
+
 # patch making libcurl multilib ready
 Patch101: 0101-curl-7.32.0-multilib.patch
 
@@ -185,6 +188,7 @@ be installed.
 %setup -q
 
 # upstream patches
+%patch1 -p1
 
 # Fedora patches
 %patch101 -p1
@@ -411,6 +415,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
 %{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
 
 %changelog
+* Tue Mar 15 2022 Kamil Dudka <kdudka@redhat.com> - 7.82.0-2
+- openssl: fix incorrect CURLE_OUT_OF_MEMORY error on CN check failure
+
 * Sat Mar 05 2022 Kamil Dudka <kdudka@redhat.com> - 7.82.0-1
 - new upstream release
 

                 reply	other threads:[~2026-11-02 14:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179362989237.1.7492965705354384107.rpms-curl-cbc7b73e1001@fedoraproject.org \
    --to=kdudka@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox