Fix integer overflow in stats output.

This commit is contained in:
Oliver Jowett 2015-02-11 00:14:28 +00:00
parent af382ac79c
commit 849697f84c

View file

@ -816,10 +816,10 @@ static char * appendStatsJson(char *p,
int i; int i;
p += snprintf(p, end-p, p += snprintf(p, end-p,
"\"%s\":{\"start\":%d,\"end\":%d", "\"%s\":{\"start\":%.1f,\"end\":%.1f",
key, key,
(int)st->start, st->start / 1000.0,
(int)st->end); st->end / 1000.0);
if (!Modes.net_only) { if (!Modes.net_only) {
p += snprintf(p, end-p, p += snprintf(p, end-p,