diff options
author | Tobias Brunner <tobias@strongswan.org> | 2014-01-06 15:30:02 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2014-01-06 15:30:02 +0100 |
commit | 13f2d3a2f637fc5277fc0752392f56d1af7a1ccb (patch) | |
tree | c7ec460213fead0e5aedd3281e7c425402961879 /src | |
parent | 0773c7fd71ac6b0e873c94699f9ff45b0eb66489 (diff) | |
download | strongswan-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.
Diffstat (limited to 'src')
-rw-r--r-- | src/libstrongswan/utils/utils.c | 2 |
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) |