bugzilla-daemon at bugzilla.netfilter.org
2013-Jan-28 15:46 UTC
[Bug 807] New: output_GRAPHITE segfault on i386
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.
bugzilla-daemon at bugzilla.netfilter.org
2013-Feb-17 13:02 UTC
[Bug 807] output_GRAPHITE segfault on i386
http://bugzilla.netfilter.org/show_bug.cgi?id=807
Pablo Neira Ayuso <pablo at netfilter.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pablo at netfilter.org
AssignedTo|netfilter-buglog at lists.netf |eric at regit.org
|ilter.org |
--
Configure bugmail: http://bugzilla.netfilter.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
bugzilla-daemon at bugzilla.netfilter.org
2013-Feb-17 21:59 UTC
[Bug 807] output_GRAPHITE segfault on i386
http://bugzilla.netfilter.org/show_bug.cgi?id=807
Eric Leblond <eric at regit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
--- Comment #1 from Eric Leblond <eric at regit.org> 2013-02-17 22:59:46
CET ---
Thanks for the bug report. That''s strange but time_t is a really
annoying type.
I''ve used the cast idea as it seems to be one of the only way to deal
with
time_t. I''ve cast them to uint64_t because this is an explicit type on
64 and
32 bits system.
--
Configure bugmail: http://bugzilla.netfilter.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
bugzilla-daemon at bugzilla.netfilter.org
2013-Feb-17 22:27 UTC
[Bug 807] output_GRAPHITE segfault on i386
http://bugzilla.netfilter.org/show_bug.cgi?id=807
Eric Leblond <eric at regit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #2 from Eric Leblond <eric at regit.org> 2013-02-17 23:27:32
CET ---
I''ve pushed the corresponding patch to the git tree.
--
Configure bugmail: http://bugzilla.netfilter.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.