mirror of https://github.com/aria2/aria2
2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added handling for the return values from PeerMessageUtil::createcompact(). * src/DefaultBtContext.cc (computeFastSet):pull/1/head
parent
3274b6acc7
commit
24b91983e1
|
@ -1,3 +1,9 @@
|
|||
2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Added handling for the return values from
|
||||
PeerMessageUtil::createcompact().
|
||||
* src/DefaultBtContext.cc (computeFastSet):
|
||||
|
||||
2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Fixed abort when peer's ip address is IPv4-mapped address.
|
||||
|
|
|
@ -387,7 +387,9 @@ std::deque<int32_t> DefaultBtContext::computeFastSet(const std::string& ipaddr,
|
|||
{
|
||||
std::deque<int32_t> fastSet;
|
||||
char compact[6];
|
||||
PeerMessageUtil::createcompact(compact, ipaddr, 0);
|
||||
if(!PeerMessageUtil::createcompact(compact, ipaddr, 0)) {
|
||||
return fastSet;
|
||||
}
|
||||
unsigned char tx[24];
|
||||
memcpy(tx, compact, 4);
|
||||
if((tx[0] & 0x80) == 0 || (tx[0] & 0x40) == 0) {
|
||||
|
|
Loading…
Reference in New Issue