mirror of https://github.com/aria2/aria2
2006-05-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
To fix the bug that cause segfaults if a zero-length peer list is a zero-length list: * src/TrackerUpdateCommand.cc (execute): Added a check to see wether the type of peers is Data*.pull/1/head
parent
3dcbda0676
commit
7774b6330c
|
@ -1,3 +1,11 @@
|
|||
2006-05-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
To fix the bug that cause segfaults if a zero-length peer list is
|
||||
a zero-length list:
|
||||
|
||||
* src/TrackerUpdateCommand.cc
|
||||
(execute): Added a check to see wether the type of peers is Data*.
|
||||
|
||||
2006-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
* Release 0.5.0
|
||||
|
|
|
@ -126,8 +126,9 @@ bool TrackerUpdateCommand::execute() {
|
|||
logger->debug("CUID#%d - Incomplete:%d",
|
||||
cuid, e->torrentMan->incomplete);
|
||||
}
|
||||
if(dynamic_cast<const Data*>(response->get("peers"))) {
|
||||
Data* peers = (Data*)response->get("peers");
|
||||
if(peers != NULL) {
|
||||
if(peers != NULL && peers->getLen() > 0) {
|
||||
for(int i = 0; i < peers->getLen(); i += 6) {
|
||||
unsigned int ipaddr1 = (unsigned char)*(peers->getData()+i);
|
||||
unsigned int ipaddr2 = (unsigned char)*(peers->getData()+i+1);
|
||||
|
@ -159,6 +160,7 @@ bool TrackerUpdateCommand::execute() {
|
|||
e->commands.push_back(command);
|
||||
logger->debug("CUID#%d - Adding new command CUID#%d", cuid, newCuid);
|
||||
}
|
||||
}
|
||||
if(e->torrentMan->req->getTrackerEvent() == Request::STARTED) {
|
||||
e->torrentMan->req->setTrackerEvent(Request::AUTO);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue