Permalink
Browse files

Accept invalid .torrent files.

Accept .torrent files whose bencoded dictionaries are not in
alphabetical order.
  • Loading branch information...
1 parent c550cbb commit 382ccb74857c8de10d3319486a4a1137763badf7 Brian M. Waters committed Apr 3, 2012
Showing with 1 addition and 3 deletions.
  1. +1 −3 misc/benc.c
View
@@ -233,10 +233,8 @@ benc_dget_any(const char *p, const char *key)
cmp = strncmp(bstr, key, blen);
if (cmp == 0 && len == blen)
return p;
- else if (cmp <= 0)
- p = benc_next(p);
else
- return NULL;
+ p = benc_next(p);
}
return NULL;
}

0 comments on commit 382ccb7

Please sign in to comment.