mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-07 00:01:49 -04:00
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.
This commit is contained in:
parent
0773c7fd71
commit
13f2d3a2f6
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user