Bug#893472: libfurl-perl: broken on s390x?

Niko Tyni ntyni at debian.org
Tue Mar 20 19:59:46 UTC 2018


Control: retitle -1 libplack-middleware-deflater-perl: broken on big endian hosts
Control: reassign -1 libplack-middleware-deflater-perl 0.12-1
Control: tag -1 patch
Control: affects -1 libfurl-perl

On Mon, Mar 19, 2018 at 09:35:03PM +0200, Niko Tyni wrote:

> I got as far as seeing that removing line 144 in Deflater.pm
> 
>  https://sources.debian.org/src/libplack-middleware-deflater-perl/0.12-1/lib/Plack/Middleware/Deflater.pm/#L144
> 
> -       $buf .= pack("LL", $self->{crc},$self->{length}) if $self->{encoding} eq 'gzip';
> 
> makes both test suites pass, but that doesn't seem like a fully
> satisfactory patch. (And no, s/LL/NN/ doesn't fix it.)

Hum, this is somewhat embarrassing. s/LL/VV/ does seem to fix it, which
makes sense as L and N are equivalent on big-endian while L and V are
equivalent on little-endian. I blame lack of sleep.

Also, RFC 1952 says

      All multi-byte numbers in the format described here are stored
      with the least-significant byte first (at the lower memory address).

so little endian seems to be correct.

Lightly tested patch attached; reassigning.
-- 
Niko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-gzip-trailer-on-big-endian-hosts.patch
Type: text/x-diff
Size: 1088 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20180320/dfbcadda/attachment.patch>


More information about the pkg-perl-maintainers mailing list