From 0c6657d64d97640e65c80592b941b7a9c0289326 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sun, 19 Sep 2010 21:07:57 +0000 Subject: [PATCH] (trunk libT) #3539 "Transmission sending corrupt data in metadata exchange" -- fixed. Thanks to The_8472 of Vuze fame for reporting this. :) --- libtransmission/torrent-magnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libtransmission/torrent-magnet.c b/libtransmission/torrent-magnet.c index d64167114..0f87038c8 100644 --- a/libtransmission/torrent-magnet.c +++ b/libtransmission/torrent-magnet.c @@ -116,7 +116,7 @@ findInfoDictOffset( const tr_torrent * tor ) int infoLen; char * infoContents = tr_bencToStr( infoDict, TR_FMT_BENC, &infoLen ); const uint8_t * i = (const uint8_t*) tr_memmem( (char*)fileContents, fileLen, infoContents, infoLen ); - offset = i == NULL ? i - fileContents : 0; + offset = i != NULL ? i - fileContents : 0; tr_free( infoContents ); }