linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #04183
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2541: Fix an integer overflow when starting a search 25 days after the previous one
------------------------------------------------------------
revno: 2541
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Sat 2011-05-28 18:22:23 +0200
message:
Fix an integer overflow when starting a search 25 days after the previous one
modified:
changelog.txt
dcpp/SearchManager.h
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'changelog.txt'
--- changelog.txt 2011-05-27 11:03:29 +0000
+++ changelog.txt 2011-05-28 16:22:23 +0000
@@ -26,6 +26,7 @@
* Add notifications via balloon popups and sound (poy)
* Fix taskbar tab previews when DC++ is elevated (poy)
* When holding shift at start, hubs are opened but not connected to (poy)
+* Fix an integer overflow when starting a search 25 days after the previous one
-- 0.782 2011-03-05 --
* Prevent a remote crash triggered via malformed user commands (poy)
=== modified file 'dcpp/SearchManager.h'
--- dcpp/SearchManager.h 2011-04-13 19:16:51 +0000
+++ dcpp/SearchManager.h 2011-05-28 16:22:23 +0000
@@ -85,7 +85,7 @@
void onRES(const AdcCommand& cmd, const UserPtr& from, const string& removeIp = Util::emptyString);
int32_t timeToSearch() {
- return 5 - (static_cast<int32_t>(GET_TICK() - lastSearch) / 1000);
+ return 5 - (static_cast<int64_t>(GET_TICK() - lastSearch) / 1000);
}
bool okToSearch() {