DescriptionHedayat Vatankhah
2017-10-18 07:27:23 UTC
Description of problem:
Crash in the last command:
% export LANG=en_US.UTF-8
[hedayat@hv ~]% date
Wed Oct 18 10:54:07 +0330 2017
[hedayat@hv ~]% timedatectl
Local time: Wed 2017-10-18 11:24:10 +0400
Universal time: Wed 2017-10-18 07:24:10 UTC
RTC time: Wed 2017-10-18 07:24:10
Time zone: Asia/Folan (+0400, +0400)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no
[hedayat@hv ~]%
[hedayat@hv ~]% export LANG=fa_IR.UTF-8
[hedayat@hv ~]% date
چهارشنبه ۱۸ اكتبر ۱۷، ساعت ۱۰:۵۴:۲۴ (+0330)
[hedayat@hv ~]% timedatectl
Assertion 'xstrftime: a[] must be big enough' failed at ../src/timedate/timedatectl.c:105, function print_status_info(). Aborting.
zsh: abort (core dumped) timedatectl
Version-Release number of selected component (if applicable):
systemd-234-8.fc27.x86_64
How reproducible:
Depends on the current day of week. Happens on Wednesdays & Thursdays in fa_IR locale
src/basic/time-util.h:75:#define FORMAT_TIMESTAMP_MAX (3+1+10+1+8+1+6+1+6+1)
src/timedate/timedatectl.c:75: char a[FORMAT_TIMESTAMP_MAX];
src/timedate/timedatectl.c:105 xstrftime(a, "%a %Y-%m-%d %H:%M:%S %Z", localtime_r(&sec, &tm));
It seems that the maximum format length assumption only holds for non-wide/variable encoded characters.
Comment 2Zbigniew Jędrzejewski-Szmek
2017-10-18 14:32:23 UTC