diff options
author | Wayne Davison <wayned@samba.org> | 2011-08-27 10:28:20 -0700 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2011-08-27 12:05:07 -0700 |
commit | 18749579b57e5b2f3ab2050c88bf2750686be246 (patch) | |
tree | 0c35d646d7b16d683978d76ba7ebe418f5707da5 /io.c | |
parent | a05758fde647e1d1b36446ca09afbb9433799920 (diff) | |
download | android_external_rsync-18749579b57e5b2f3ab2050c88bf2750686be246.tar.gz android_external_rsync-18749579b57e5b2f3ab2050c88bf2750686be246.tar.bz2 android_external_rsync-18749579b57e5b2f3ab2050c88bf2750686be246.zip |
Fix bwlimit multiplication overflow. Fixes bug 8375.
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1936,7 +1936,7 @@ static void sleep_for_bwlimit(int bytes_written) if (prior_tv.tv_sec) { elapsed_usec = (start_tv.tv_sec - prior_tv.tv_sec) * ONE_SEC + (start_tv.tv_usec - prior_tv.tv_usec); - total_written -= elapsed_usec * bwlimit / (ONE_SEC/1024); + total_written -= (int64)elapsed_usec * bwlimit / (ONE_SEC/1024); if (total_written < 0) total_written = 0; } |