From 1eb3cf2a8ea9b0a4c01fccb420fd9f43667e2fb2 Mon Sep 17 00:00:00 2001 From: Eric Petit Date: Tue, 23 Jan 2007 20:54:54 +0000 Subject: [PATCH] Should fix #193 --- libtransmission/tracker.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libtransmission/tracker.c b/libtransmission/tracker.c index 2cc8d3092..530c74eb3 100644 --- a/libtransmission/tracker.c +++ b/libtransmission/tracker.c @@ -987,17 +987,12 @@ static void readScrapeAnswer( tr_tracker_t * tc, const char * data, int len ) } val1 = tr_bencDictFind( &scrape, "files" ); - if( !val1 ) + if( !val1 || val1->type != TYPE_DICT || val1->val.l.count < 1 ) { tr_bencFree( &scrape ); return; } val1 = &val1->val.l.vals[1]; - if( !val1 ) - { - tr_bencFree( &scrape ); - return; - } val2 = tr_bencDictFind( val1, "complete" ); if( !val2 )