Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 12 Apr 2012 23:04:16 +0400
From: Solar Designer <solar@...nwall.com>
To: owl-dev@...ts.openwall.com
Subject: Re: lftp update

On Thu, Apr 12, 2012 at 10:43:09PM +0400, Solar Designer wrote:
> lftp: Torrent.cc:119: Torrent::Torrent(const char*, const char*, const char*): Assertion `my_peer_id.length()==PEER_ID_LEN' failed.
> Aborted
> 
> This is only seen in the x86_64 build, but not in the i686 build.
> 
> I suggest that we start by updating lftp in Owl-current to latest, then
> if there are no issues with it for a while just include this update into
> 3.0-stable as well.  This will likely eliminate the need for
> investigating and patching the above issue separately (I guess it is
> already fixed upstream).

I've just tried building 4.3.6 from source, and the problem is still
there.  So I've investigated it.  Turns out that it's not x86_64 vs.
i686 that made the difference, but rather the PID of the lftp process
did.  I've attached a patch that we'll need to include.  I'll also
report this upstream.

Alexander

--- lftp-4.3.6/src/Torrent.cc.orig	2012-02-14 10:09:24 +0000
+++ lftp-4.3.6/src/Torrent.cc	2012-04-12 18:56:46 +0000
@@ -173,7 +173,7 @@ Torrent::Torrent(const char *mf,const ch
    }
    if(!my_peer_id) {
       my_peer_id.set("-lftp43-");
-      my_peer_id.appendf("%04x",(unsigned)getpid());
+      my_peer_id.appendf("%04x",(unsigned)getpid() & 0xffff);
       my_peer_id.appendf("%08x",(unsigned)now.UnixTime());
       assert(my_peer_id.length()==PEER_ID_LEN);
    }

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ