Skip to content

Commit b5a9af8

Browse files
committed
time64: Assert if date is pointing to NULL
Given the fact that timegm64 is only invoked with a valid pointer, this should never trigger.
1 parent 3588b4d commit b5a9af8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/time64.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ Time64_T timegm64(const struct TM *date) {
224224
Time64_T days = 0;
225225
Time64_T seconds = 0;
226226
Year year;
227+
assert(date != NULL);
227228
Year orig_year = (Year)date->tm_year;
228229
int cycles = 0;
229230

0 commit comments

Comments
 (0)