chiark / gitweb /
Simplify execute_directory()
[elogind.git] / src / shared / time-dst.c
index 926d22b94b62fd4c6180f6b96cdebb5caf301760..1ce6f721b7c895a5260d5b01b4faa92905d6f501 100644 (file)
@@ -183,7 +183,8 @@ read_again:
                         return -EINVAL;
         }
 
-        transitions = malloc0(total_size + tzspec_len);
+        /* leave space for additional zone_names zero terminator */
+        transitions = malloc0(total_size + tzspec_len + 1);
         if (transitions == NULL)
                 return -EINVAL;