Check the trash chunk allocation in conv_time_common(), also remove the
data initialisation which is already done when allocating.
Fixes issue #2227.
No backported needed.
width = 9;
cpy = needle - p;
- if (!tmp_format) {
- tmp_format = alloc_trash_chunk();
- tmp_format->data = 0;
- }
+ if (!tmp_format)
+ tmp_format = alloc_trash_chunk();
+ if (!tmp_format)
+ goto error;
if (set != 9) /* if the snprintf wasn't done yet */
set = snprintf(ns_str, sizeof(ns_str), "%.9llu", (unsigned long long)ns);