[v9_9] fix queryperf integer overflow

3706.	[contrib]	queryperf: Fixed a possible integer overflow when
			printing results. [RT #35182]
This commit is contained in:
Evan Hunt 2014-01-14 16:57:15 -08:00
parent e5ac85796f
commit 3489e7380c
2 changed files with 15 additions and 3 deletions

View file

@ -1,3 +1,6 @@
3706. [contrib] queryperf: Fixed a possible integer overflow when
printing results. [RT #35182]
3704. [protocol] Accept integer timestamps in RRSIG records. [RT #35185]
--- 9.9.5rc1 released ---

View file

@ -2170,12 +2170,21 @@ main(int argc, char **argv) {
printf("[Status] Processing input data\n");
while ((sending = keep_sending(&got_eof)) == TRUE ||
queries_outstanding() > 0) {
print_interval_statistics();
queries_outstanding() > 0)
{
if (num_queries_sent_interval > 0){
/*
* After statistics are printed, send_query()
* needs to be called at least once so that
* time_of_first_query_interval is reset
*/
print_interval_statistics();
}
adjust_rate = FALSE;
while ((sending = keep_sending(&got_eof)) == TRUE &&
queries_outstanding() < max_queries_outstanding) {
queries_outstanding() < max_queries_outstanding)
{
int len = next_input_line(input_line, input_length);
if (len == 0) {
got_eof = TRUE;