Package: flow-tools Version: 1:0.67-8 Severity: normal Tags: patch
Incorrect print of time in flow-header (capture start, capture end) -- System Information: Debian Release: 3.1 Architecture: amd64 (x86_64) Kernel: Linux 2.6.12 Locale: LANG=ru_RU.KOI8-R, LC_CTYPE=ru_RU.KOI8-R (charmap=KOI8-R) Versions of packages flow-tools depends on: ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an ii libmysqlclient12 4.0.24-10 mysql database client library ii libpq3 7.4.7-6sarge1 PostgreSQL C client library ii libwrap0 7.6.dbs-8 Wietse Venema's TCP wrappers libra ii zlib1g 1:1.2.2-4.sarge.2 compression library - runtime -- no debconf information
--- flow-tools-0.67.orig/lib/ftio.c +++ flow-tools-0.67/lib/ftio.c @@ -1605,6 +1605,7 @@ u_int32 flags, fields; u_long period; int n, streaming2; + time_t t; fth = &ftio->fth; @@ -1639,17 +1640,21 @@ } if (!streaming2) - if (fields & FT_FIELD_CAP_START) + if (fields & FT_FIELD_CAP_START) { + t = fth->cap_start; fprintf(std, "%c capture start: %s", cc, - ctime((time_t*)&fth->cap_start)); + ctime(&t)); + } if (!streaming2) { if ((flags & FT_HEADER_FLAG_DONE) || (flags & FT_HEADER_FLAG_PRELOADED)) { - if (fields & FT_FIELD_CAP_END) + if (fields & FT_FIELD_CAP_END) { + t = fth->cap_end; fprintf(std, "%c capture end: %s", cc, - ctime((time_t*)&fth->cap_end)); + ctime(&t)); + } period = fth->cap_end - fth->cap_start; if ((fields & FT_FIELD_CAP_END) && (fields & FT_FIELD_CAP_START))