[Bug 807] New: output_GRAPHITE segfault on i386

bugzilla-daemon at bugzilla.netfilter.org bugzilla-daemon at bugzilla.netfilter.org
Mon Jan 28 16:46:33 CET 2013


http://bugzilla.netfilter.org/show_bug.cgi?id=807

           Summary: output_GRAPHITE segfault on i386
           Product: ulogd
           Version: SVN (please provide timestamp)
          Platform: i386
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P5
         Component: ulogd
        AssignedTo: netfilter-buglog at lists.netfilter.org
        ReportedBy: netfilter at openenterprise.co.uk
   Estimated Hours: 0.0


output_GRAPHITE assumes time_t to be a unsigned long long, This causes compiler
warnings and ultimately a segfault when used on a i386 platform. Casting the
time_t variable fixes this.

Regards
Nick

diff --git a/output/ulogd_output_GRAPHITE.c b/output/ulogd_output_GRAPHITE.c
index a4b31a5..bff8ff2 100644
--- a/output/ulogd_output_GRAPHITE.c
+++ b/output/ulogd_output_GRAPHITE.c
@@ -164,11 +164,11 @@ static int _output_graphite(struct ulogd_pluginstance
*upi)
                 prefix_ce(upi->config_kset).u.string,
                 (char *)ikey_get_ptr(&inp[KEY_SUM_NAME]),
                 ikey_get_u64(&inp[KEY_SUM_PKTS]),
-                now,
+                (unsigned long long) now,
                 prefix_ce(upi->config_kset).u.string,
                 (char *)ikey_get_ptr(&inp[KEY_SUM_NAME]),
                 ikey_get_u64(&inp[KEY_SUM_BYTES]),
-                now
+                (unsigned long long) now
                 );
        if (msg_size == -1) {
                ulogd_log(ULOGD_ERROR, "Could not create message\n");

-- 
Configure bugmail: http://bugzilla.netfilter.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the netfilter-buglog mailing list