fixed bug in bdecoder

This commit is contained in:
Arvid Norberg
2010-06-15 17:00:23 +00:00
parent 9ddf7f7cfa
commit 93bdc61410
3 changed files with 25 additions and 0 deletions

View File

@@ -106,6 +106,7 @@ namespace libtorrent
stack.pop_back();
continue;
}
if (!is_digit(t)) return fail_bdecode(ret);
boost::int64_t len = t - '0';
start = parse_int(start, end, ':', len);
if (start == 0 || start + len + 3 > end || *start != ':') return fail_bdecode(ret);