Your message dated Sun, 05 Jul 2009 03:32:46 +0200
with message-id <[email protected]>
and subject line Closing old bug
has caused the Debian Bug report #533628,
regarding transmission-cli: Segmentation Fault if no announce URL given when
creating a torrent
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
533628: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=533628
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: transmission-cli
Version: 1.22-1
Severity: minor
Tags: patch
If you try to create a torrent (-c option) and dont give an announce URL
(-a option), transmissioncli segfaults.
Here are two patches, the 1st one prevents the segmentation fault, the
second display an error message at command line parsing.
--- libtransmission/utils.c 2008-06-14 00:00:42.000000000 +0200
+++ libtransmission/utils.c.new 2009-06-19 14:20:32.000000000 +0200
@@ -968,6 +968,9 @@
const char * host = NULL;
const char * path = NULL;
+ if (!(url_in && *url_in))
+ return TRUE;
+
tmp = tr_strndup( url_in, len );
if(( pch = strstr( tmp, "://" )))
--- cli/transmissioncli.c 2008-06-14 00:00:51.000000000 +0200
+++ cli/transmissioncli.c.new 2009-06-19 14:20:47.000000000 +0200
@@ -221,14 +221,22 @@
if( sourceFile && *sourceFile ) /* creating a torrent */
{
int err;
- tr_metainfo_builder * builder = tr_metaInfoBuilderCreate( h,
sourceFile );
- tr_makeMetaInfo( builder, torrentPath, announce, comment,
isPrivate );
- while( !builder->isDone ) {
- tr_wait( 1000 );
- printf( "." );
+ if (!(announce && *announce))
+ {
+ err=-1;
+ fprintf( stderr, "You must specify an annouce URL to create
a torrent\n");
+ }
+ else
+ {
+ tr_metainfo_builder * builder = tr_metaInfoBuilderCreate(
h, sourceFile );
+ tr_makeMetaInfo( builder, torrentPath, announce, comment,
isPrivate );
+ while( !builder->isDone ) {
+ tr_wait( 1000 );
+ printf( "." );
+ }
+ err = builder->result;
+ tr_metaInfoBuilderFree( builder );
}
- err = builder->result;
- tr_metaInfoBuilderFree( builder );
return err;
}
-- System Information:
Debian Release: 5.0.1
APT prefers stable
APT policy: (990, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.30 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages transmission-cli depends on:
ii libc6 2.7-18 GNU C Library: Shared libraries
ii libcomerr2 1.41.3-1 common error description
library
ii libcurl3 7.18.2-8lenny2 Multi-protocol file
transfer libra
ii libidn11 1.8+20080606-1 GNU libidn library,
implementation
ii libkrb53 1.6.dfsg.4~beta1-5lenny1 MIT Kerberos runtime libraries
ii libldap-2.4-2 2.4.11-1 OpenLDAP libraries
ii libssh2-1 0.18-1 SSH2 client-side library
ii libssl0.9.8 0.9.8g-15+lenny1 SSL shared libraries
ii transmission-co 1.22-1 free, lightweight
BitTorrent clien
ii zlib1g 1:1.2.3.3.dfsg-12 compression library - runtime
transmission-cli recommends no packages.
transmission-cli suggests no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
Version: 1.71-1
I'm marking this as fixed on 1.71 cause 1.70 didn't get uploaded.
Probably the same reason it slipped me.
Thanks for the info Charles!
I'm currently preparing packages for Lenny with backported versions of
this fix plus a fix for #533609[0].
Cheers
[0] http://bugs.debian.org/533609
--
Leo "costela" Antunes
[insert a witty retort here]
--- End Message ---