aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2014-01-06 15:30:02 +0100
committerTobias Brunner <tobias@strongswan.org>2014-01-06 15:30:02 +0100
commit13f2d3a2f637fc5277fc0752392f56d1af7a1ccb (patch)
treec7ec460213fead0e5aedd3281e7c425402961879
parent0773c7fd71ac6b0e873c94699f9ff45b0eb66489 (diff)
downloadstrongswan-13f2d3a2f637fc5277fc0752392f56d1af7a1ccb.tar.bz2
strongswan-13f2d3a2f637fc5277fc0752392f56d1af7a1ccb.tar.xz
utils: Fix %T printf hook on big-endian systems
The cast to a bool* cut of the actual value on big-endian systems if bool was shorter than int because the bool argument to printf gets promoted to an int. Fixes #479.
-rw-r--r--src/libstrongswan/utils/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstrongswan/utils/utils.c b/src/libstrongswan/utils/utils.c
index 266fb4357..4bacb5834 100644
--- a/src/libstrongswan/utils/utils.c
+++ b/src/libstrongswan/utils/utils.c
@@ -570,7 +570,7 @@ int time_printf_hook(printf_hook_data_t *data, printf_hook_spec_t *spec,
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
time_t *time = *((time_t**)(args[0]));
- bool utc = *((bool*)(args[1]));;
+ bool utc = *((int*)(args[1]));
struct tm t;
if (*time == UNDEFINED_TIME)