added patch to address underflow when -n is not a multiple of -l
from Nathan Jones: https://sourceforge.net/tracker/index.php?func=detail&aid=1943432&group_id=128336&atid=711373
Этот коммит содержится в:
родитель
7566010019
Коммит
0c9092408e
3
AUTHORS
3
AUTHORS
@ -28,3 +28,6 @@ Andrew Gallatin <gallatin@gmail.com>
|
|||||||
|
|
||||||
Stephen Hemminger <shemminger@linux-foundation.org>
|
Stephen Hemminger <shemminger@linux-foundation.org>
|
||||||
* Linux congestion control selection and theading improvements
|
* Linux congestion control selection and theading improvements
|
||||||
|
|
||||||
|
Nathan Jones <nmjones@users.sourceforge.net>
|
||||||
|
* patch for underflow when value specified in -n is not a multiple of -l
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2008-05-09 Nathan Jones <nmjones@users.sourceforge.net>
|
||||||
|
|
||||||
|
* prevent underflow when the amount of data to be transmitted (-n) is not a
|
||||||
|
multiple of the buffer size (-l) Patch:
|
||||||
|
https://sourceforge.net/tracker/index.php?func=detail&aid=1943432&group_id=128336&atid=711373
|
||||||
|
|
||||||
2008-04-08 Jon Dugan <jdugan@x1024.net>
|
2008-04-08 Jon Dugan <jdugan@x1024.net>
|
||||||
|
|
||||||
* print report headers only once
|
* print report headers only once
|
||||||
|
@ -170,7 +170,12 @@ void Client::RunTCP( void ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( !mMode_Time ) {
|
if ( !mMode_Time ) {
|
||||||
mSettings->mAmount -= currLen;
|
/* mAmount may be unsigned, so don't let it underflow! */
|
||||||
|
if( mSettings->mAmount >= currLen ) {
|
||||||
|
mSettings->mAmount -= currLen;
|
||||||
|
} else {
|
||||||
|
mSettings->mAmount = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} while ( ! (sInterupted ||
|
} while ( ! (sInterupted ||
|
||||||
@ -310,7 +315,12 @@ void Client::Run( void ) {
|
|||||||
delay_loop( delay );
|
delay_loop( delay );
|
||||||
}
|
}
|
||||||
if ( !mMode_Time ) {
|
if ( !mMode_Time ) {
|
||||||
mSettings->mAmount -= currLen;
|
/* mAmount may be unsigned, so don't let it underflow! */
|
||||||
|
if( mSettings->mAmount >= currLen ) {
|
||||||
|
mSettings->mAmount -= currLen;
|
||||||
|
} else {
|
||||||
|
mSettings->mAmount = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} while ( ! (sInterupted ||
|
} while ( ! (sInterupted ||
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user