public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Tomas Mraz <tmraz@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/openssl] rebase_40beta: preserve new line in fd BIO BIO_gets() as other BIOs do
Date: Tue, 09 Jun 2026 12:43:57 GMT	[thread overview]
Message-ID: <178100903759.1.13272623959748737151.rpms-openssl-fe449cd23c65@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/openssl
Branch : rebase_40beta
Commit : fe449cd23c6552e26a5c6934eecc81c3b8ff7b86
Author : Tomas Mraz <tmraz@fedoraproject.org>
Date   : 2016-12-22T14:40:28+01:00
Stats  : +35/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/openssl/c/fe449cd23c6552e26a5c6934eecc81c3b8ff7b86?branch=rebase_40beta

Log:
preserve new line in fd BIO BIO_gets() as other BIOs do

---
diff --git a/openssl-1.1.0-bio-fd-preserve-nl.patch b/openssl-1.1.0-bio-fd-preserve-nl.patch
new file mode 100644
index 0000000..0050115
--- /dev/null
+++ b/openssl-1.1.0-bio-fd-preserve-nl.patch
@@ -0,0 +1,29 @@
+diff -up openssl-1.1.0c/crypto/bio/bss_fd.c.preserve-nl openssl-1.1.0c/crypto/bio/bss_fd.c
+--- openssl-1.1.0c/crypto/bio/bss_fd.c.preserve-nl	2016-11-10 15:03:44.000000000 +0100
++++ openssl-1.1.0c/crypto/bio/bss_fd.c	2016-12-22 14:36:16.730740423 +0100
+@@ -202,8 +202,10 @@ static int fd_gets(BIO *bp, char *buf, i
+     char *ptr = buf;
+     char *end = buf + size - 1;
+ 
+-    while ((ptr < end) && (fd_read(bp, ptr, 1) > 0) && (ptr[0] != '\n'))
+-        ptr++;
++    while (ptr < end && fd_read(bp, ptr, 1) > 0) {
++        if (*ptr++ == '\n')
++           break;
++    }
+ 
+     ptr[0] = '\0';
+ 
+diff -up openssl-1.1.0c/doc/crypto/BIO_read.pod.preserve-nl openssl-1.1.0c/doc/crypto/BIO_read.pod
+--- openssl-1.1.0c/doc/crypto/BIO_read.pod.preserve-nl	2016-11-10 15:03:45.000000000 +0100
++++ openssl-1.1.0c/doc/crypto/BIO_read.pod	2016-12-22 14:37:22.731245197 +0100
+@@ -23,7 +23,8 @@ in B<buf>. Usually this operation will a
+ from the BIO of maximum length B<len-1>. There are exceptions to this,
+ however; for example, BIO_gets() on a digest BIO will calculate and
+ return the digest and other BIOs may not support BIO_gets() at all.
+-The returned string is always NUL-terminated.
++The returned string is always NUL-terminated and the '\n' is preserved
++if present in the input data.
+ 
+ BIO_write() attempts to write B<len> bytes from B<buf> to BIO B<b>.
+ 

diff --git a/openssl.spec b/openssl.spec
index ec410fc..2e053d7 100644
--- a/openssl.spec
+++ b/openssl.spec
@@ -22,7 +22,7 @@
 Summary: Utilities from the general purpose cryptography library with TLS implementation
 Name: openssl
 Version: 1.1.0c
-Release: 4%{?dist}
+Release: 5%{?dist}
 Epoch: 1
 # We have to remove certain patented algorithms from the openssl source
 # tarball with the hobble-openssl script which is included below.
@@ -59,6 +59,7 @@ Patch40: openssl-1.1.0-disable-ssl3.patch
 Patch41: openssl-1.1.0-system-cipherlist.patch
 Patch42: openssl-1.1.0-fips.patch
 Patch43: openssl-1.1.0-afalg-eventfd2.patch
+Patch44: openssl-1.1.0-bio-fd-preserve-nl.patch
 # Backported fixes including security fixes
 Patch60: openssl-1.1.0-sslread-revert.patch
 Patch61: openssl-1.1.0-cert-req.patch
@@ -160,6 +161,7 @@ cp %{SOURCE13} test/
 %patch41 -p1 -b .system-cipherlist
 %patch42 -p1 -b .fips
 %patch43 -p1 -b .eventfd2
+%patch44 -p1 -b .preserve-nl
 
 %patch60 -p1 -b .sslread-revert
 %patch61 -p1 -b .cert-req
@@ -430,6 +432,9 @@ export LD_LIBRARY_PATH
 %postun libs -p /sbin/ldconfig
 
 %changelog
+* Thu Dec 22 2016 Tomáš Mráz <tmraz@redhat.com> 1.1.0c-5
+- preserve new line in fd BIO BIO_gets() as other BIOs do
+
 * Fri Dec  2 2016 Tomáš Mráz <tmraz@redhat.com> 1.1.0c-4
 - FIPS mode fixes for TLS
 

                 reply	other threads:[~2026-06-09 12:43 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=178100903759.1.13272623959748737151.rpms-openssl-fe449cd23c65@fedoraproject.org \
    --to=tmraz@fedoraproject.org \
    --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