am-utils/am-utils-6.2-Fix-SEGV-on-amq-entries-that-print-times.patch

20 lines
518 B
Diff
Raw Normal View History

commit 6a12fc0acb3afb654ba5e6efdeb28b943e2efd3e
Author: zoulasc <christos@zoulas.com>
Date: Thu Mar 31 14:56:53 2016 -0400
Fix SEGV on amq entries that print times.
diff --git a/amq/amq.c b/amq/amq.c
index dc5fe02..04f9e4d 100644
--- a/amq/amq.c
+++ b/amq/amq.c
@@ -79,7 +79,7 @@ enum show_opt {
static void
time_print(time_type tt)
{
- time_t t = (time_t)*tt;
+ time_t t = (time_t)(intptr_t)tt;
struct tm *tp = localtime(&t);
printf("%02d/%02d/%04d %02d:%02d:%02d",
tp->tm_mon + 1, tp->tm_mday,