Debian Bug report logs - #197039
publib-dev: base64 broken on little-endian machines

version graph

Package: publib-dev; Maintainer for publib-dev is Antti-Juhani Kaijanaho <ajk@debian.org>; Source for publib-dev is src:publib.

Reported by: Timothee Besset <ttimo@ttimo.net>

Date: Wed, 11 Jun 2003 16:18:04 UTC

Severity: normal

Found in version 0.34-2

Fixed in version publib/0.35-1

Done: Lars Wirzenius <liw@iki.fi>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Lars Wirzenius <liw@iki.fi>:
Bug#197039; Package publib-dev. Full text and rfc822 format available.

Acknowledgement sent to Timothee Besset <ttimo@ttimo.net>:
New Bug report received and forwarded. Copy sent to Lars Wirzenius <liw@iki.fi>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Timothee Besset <ttimo@ttimo.net>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: publib-dev: base64 broken on little-endian machines
Date: Wed, 11 Jun 2003 18:11:13 +0200
[Message part 1 (text/plain, inline)]
Package: publib-dev
Version: 0.34-2
Severity: normal

the base64 on little-endian machines *seems* to work fine, but actually, it's broken. it doesn't encode/decode the same thing as other base64 implementation. I have been successfully using it to encode/decode internally, but when I start encoding with python and decoding with that code, it fails horribly.

this is because of specific sixtet write/extract code with an int. I believe that code was written on big endian machine, and probably works fine there, but on a little endian box, it does a nasty swap around without even knowing it (resulting in it can encode/decode it's own streams, but it will fail to talk to actual base64 implementations)

I have been using python's base64 module for testing/validation, and fixed the code to work for little endian. I use specific functions for the sixtet extraction. Attaching my modified code snippets.

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux sparkle 2.4.21-rc3 #2 SMP Mon May 26 16:05:32 CEST 2003 i686
Locale: LANG=C, LC_CTYPE=C

-- no debconf information

[/home/timo/publib-bug.txt (text/plain, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Lars Wirzenius <liw@iki.fi>:
Bug#197039; Package publib-dev. Full text and rfc822 format available.

Acknowledgement sent to Lars Wirzenius <liw@liw.iki.fi>:
Extra info received and forwarded to list. Copy sent to Lars Wirzenius <liw@iki.fi>. Full text and rfc822 format available.

Message #10 received at 197039@bugs.debian.org (full text, mbox):

From: Lars Wirzenius <liw@liw.iki.fi>
To: Timothee Besset <ttimo@ttimo.net>, 197039@bugs.debian.org
Subject: Re: Bug#197039: publib-dev: base64 broken on little-endian machines
Date: Sat, 15 Nov 2003 20:46:46 +0200
ke, 2003-06-11 kello 19:11, Timothee Besset kirjoitti:
> the base64 on little-endian machines *seems* to work fine, but actually, 
> it's broken. it doesn't encode/decode the same thing as other base64 
> implementation. I have been successfully using it to encode/decode 
> internally, but when I start encoding with python and decoding with that 
> code, it fails horribly.

You are quite right. I also did not like the code as it is, it was way
too creepy and hard to follow. So I rewrote it, in a way that I find is
simple. I didn't use your code, however, mostly because it didn't follow
the style of the code. Thank you, anyway.

I apologize for taking so long to fix this, but I've been rather busy at
work.

I also plan on orphaning the whole thing, in Debian and upstream, since
I don't use it myself anymore.

-- 
http://liw.iki.fi/liw/log/



Reply sent to Lars Wirzenius <liw@iki.fi>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Timothee Besset <ttimo@ttimo.net>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #15 received at 197039-close@bugs.debian.org (full text, mbox):

From: Lars Wirzenius <liw@iki.fi>
To: 197039-close@bugs.debian.org
Subject: Bug#197039: fixed in publib 0.35-1
Date: Sat, 15 Nov 2003 14:02:34 -0500
Source: publib
Source-Version: 0.35-1

We believe that the bug you reported is fixed in the latest version of
publib, which is due to be installed in the Debian FTP archive:

publib-dev_0.35-1_i386.deb
  to pool/main/p/publib/publib-dev_0.35-1_i386.deb
publib_0.35-1.diff.gz
  to pool/main/p/publib/publib_0.35-1.diff.gz
publib_0.35-1.dsc
  to pool/main/p/publib/publib_0.35-1.dsc
publib_0.35.orig.tar.gz
  to pool/main/p/publib/publib_0.35.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 197039@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Lars Wirzenius <liw@iki.fi> (supplier of updated publib package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sat, 15 Nov 2003 20:28:19 +0200
Source: publib
Binary: publib-dev
Architecture: source i386
Version: 0.35-1
Distribution: unstable
Urgency: low
Maintainer: Lars Wirzenius <liw@iki.fi>
Changed-By: Lars Wirzenius <liw@iki.fi>
Description: 
 publib-dev - C function library
Closes: 197039
Changes: 
 publib (0.35-1) unstable; urgency=low
 .
   * New upstream release. Fixes:
     - base64 broken on little-endian machines (closes: #197039)
Files: 
 a33ccadad6b7dd2cde2cde415c2e4f1b 554 devel optional publib_0.35-1.dsc
 843a8914a103d39a40219944f167c75b 184023 devel optional publib_0.35.orig.tar.gz
 c6b6098abb6d3fab585901ebe246b6aa 3711 devel optional publib_0.35-1.diff.gz
 5f4898aeff38734be137549a7355931c 119994 devel optional publib-dev_0.35-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/tnJ2BrcmpeBELXQRAveIAKDaGqOaO5u8YyaYg/t8W8BMZN59BwCeIkw/
IwehfyklGz0lpKtEsDaOur4=
=sdD6
-----END PGP SIGNATURE-----




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 18:15:47 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.