diff options
Diffstat (limited to 'src/xplist.c')
| -rw-r--r-- | src/xplist.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/xplist.c b/src/xplist.c index 3a92142..2f98983 100644 --- a/src/xplist.c +++ b/src/xplist.c | |||
| @@ -211,8 +211,7 @@ static void node_to_xml(node_t* node, bytearray_t **outbuf, uint32_t depth) | |||
| 211 | struct TM _btime; | 211 | struct TM _btime; |
| 212 | struct TM *btime = gmtime64_r(&timev, &_btime); | 212 | struct TM *btime = gmtime64_r(&timev, &_btime); |
| 213 | if (btime) { | 213 | if (btime) { |
| 214 | val = (char*)malloc(24); | 214 | val = (char*)calloc(1, 24); |
| 215 | memset(val, 0, 24); | ||
| 216 | struct tm _tmcopy; | 215 | struct tm _tmcopy; |
| 217 | copy_TM64_to_tm(btime, &_tmcopy); | 216 | copy_TM64_to_tm(btime, &_tmcopy); |
| 218 | val_len = strftime(val, 24, "%Y-%m-%dT%H:%M:%SZ", &_tmcopy); | 217 | val_len = strftime(val, 24, "%Y-%m-%dT%H:%M:%SZ", &_tmcopy); |
