diff options
author | Nei <ailin.nemui@gmail.com> | 2017-07-05 14:46:24 +0000 |
---|---|---|
committer | Nei <ailin.nemui@gmail.com> | 2017-07-05 14:46:24 +0000 |
commit | fc3615120d7a7f48afa012159acd3dc224ecf4e3 (patch) | |
tree | 1f20edc5c5d310de011e808c78fe283404b0d3ed | |
parent | 1656dc1e549cfbbe330aafcd8b92177aa9a5555f (diff) | |
parent | 29ebac987da1da2c892aed5ed329256b7bc94bca (diff) | |
download | irssi-fc3615120d7a7f48afa012159acd3dc224ecf4e3.zip |
Merge branch 'fix-10' into 'security'
Check return value of localtime
See merge request !15
-rw-r--r-- | src/core/misc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/misc.c b/src/core/misc.c index 7249b1a7..e589b8c5 100644 --- a/src/core/misc.c +++ b/src/core/misc.c @@ -556,6 +556,9 @@ char *my_asctime(time_t t) int len; tm = localtime(&t); + if (tm == NULL) + return g_strdup("???"); + str = g_strdup(asctime(tm)); len = strlen(str); |