summaryrefslogtreecommitdiff
path: root/lib/isc/tm.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/isc/tm.c')
-rw-r--r--lib/isc/tm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/isc/tm.c b/lib/isc/tm.c
index 08af2bcc95dd..842a2f7fb4ab 100644
--- a/lib/isc/tm.c
+++ b/lib/isc/tm.c
@@ -147,6 +147,12 @@ isc_tm_strptime(const char *buf, const char *fmt, struct tm *tm) {
size_t len = 0;
int alt_format, i, split_year = 0;
+ REQUIRE(buf != NULL);
+ REQUIRE(fmt != NULL);
+ REQUIRE(tm != NULL);
+
+ memset(tm, 0, sizeof(struct tm));
+
bp = buf;
while ((c = *fmt) != '\0') {