As an addendum, poking around some more I downloaded the test file, and
noticed it contains a mixture of unix and dos style line encodings:

    $ file example.html 
    example.html: HTML document, UTF-8 Unicode text, with very long lines, with 
CRLF, LF line terminators

Maybe irrelevant, but it's noteworthy that the patch immediately prior
to the one flagged above is changing behavior of handling CRLF / LF.
Essentially, patch 0016-openssl-buffering.rb-no-RS-when-output.patch is
doing:

- (...)   idx = @wbuffer.rindex($/)
+ (...)   idx = @wbuffer.rindex("\n")

and:

-      if $/ && /\n\z/ !~ s
-        s << "\n"
-      end
+      s.sub!(/(?<!\n)\z/, "\n")

I don't know Ruby enough to know what's going on exactly, but the
coincidence seems odd to me, and this code feels worthy of more study.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1835968

Title:
  Regression in backported patch for openssl 1.1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ruby2.5/+bug/1835968/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to